Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 71944 invoked from network); 26 Sep 2005 16:28:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Sep 2005 16:28:28 -0000 Received: (qmail 11507 invoked by uid 500); 26 Sep 2005 16:28:28 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 11178 invoked by uid 500); 26 Sep 2005 16:28:26 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 11158 invoked by uid 99); 26 Sep 2005 16:28:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Sep 2005 09:28:26 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_HELO_PASS,SPF_PASS,UPPERCASE_25_50 X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jta@bristowhill.com designates 66.75.162.133 as permitted sender) Received: from [66.75.162.133] (HELO ms-smtp-01-eri0.socal.rr.com) (66.75.162.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Sep 2005 09:28:32 -0700 Received: from [192.168.15.53] (cpe-204-210-23-212.san.res.rr.com [204.210.23.212]) by ms-smtp-01-eri0.socal.rr.com (8.12.10/8.12.7) with ESMTP id j8QGS1Ff003152 for ; Mon, 26 Sep 2005 09:28:01 -0700 (PDT) Message-ID: <4338218E.3020204@bristowhill.com> Date: Mon, 26 Sep 2005 09:27:58 -0700 From: "Jean T. Anderson" User-Agent: Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Discussion Subject: Re: cant' get user defined function to work References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Erik.Bengtson@intl.westernunion.com wrote: > Hi, > > I�ve created the following function: > > DROP FUNCTION JPOX_ASCII; > CREATE FUNCTION JPOX_ASCII(C CHAR(1)) RETURNS INTEGER > EXTERNAL NAME 'org.jpox.store.rdbms.adapter.Function.ascii' > CALLED ON NULL INPUT > LANGUAGE JAVA PARAMETER STYLE JAVA; > > package org.jpox.store.rdbms.adapter; > > public final class Function > > { > /** > * ASCII conversion code > * @param code > * @return > */ > > public static int ascii(String code) > > { > return (int)code.charAt(0); > } > } > Erik's function worked for me when I changed this: public final class Function to this: public class Function ij> values jpox_ascii('c'); 1 ----------- 99 1 row selected -jean