Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 3628 invoked from network); 2 Sep 2006 22:18:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Sep 2006 22:18:37 -0000 Received: (qmail 37866 invoked by uid 500); 2 Sep 2006 22:18:37 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 37835 invoked by uid 500); 2 Sep 2006 22:18:37 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 37819 invoked by uid 99); 2 Sep 2006 22:18:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Sep 2006 15:18:37 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [68.142.198.203] (HELO smtp104.sbc.mail.mud.yahoo.com) (68.142.198.203) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 02 Sep 2006 15:18:35 -0700 Received: (qmail 29977 invoked from network); 2 Sep 2006 22:18:14 -0000 Received: from unknown (HELO ?127.0.0.1?) (ddebrunner@sbcglobal.net@75.25.183.196 with plain) by smtp104.sbc.mail.mud.yahoo.com with SMTP; 2 Sep 2006 22:18:13 -0000 Message-ID: <44FA0320.9010103@apache.org> Date: Sat, 02 Sep 2006 15:18:08 -0700 From: Daniel John Debrunner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en, de MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: substring/concat/curdate/curtime References: <17657.64077.375931.514624@laura.rswheeldon.com> In-Reply-To: <17657.64077.375931.514624@laura.rswheeldon.com> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N richard@rswheeldon.com wrote: > Are these supposed to work? They're declared in the grammar, > appear to have useful code associated with them, but none > of them seem to do anything: The grammer is not the definition of the functionality, the documentation is: All of these are the names for JDBC escape functions, introduced with '{fn' and end with '}'. Try this. select {fn substring('s',2)} from simple_tab The SQL functions for this functionality are: SUBSTR || (concatenation operator) CURRENT DATE or CURRENT_DATE CURRENT TIME or CURRENT_TIME http://db.apache.org/derby/docs/dev/ref/ Look at the builtin functions section. Thanks, Dan. > ij> select substring('s',2) from simple_tab; > ERROR 42X01: Syntax error: Encountered "substring" at line 1, column 8. > ij> select substring('s',1,2) from simple_tab; > ERROR 42X01: Syntax error: Encountered "substring" at line 1, column 8. > ij> select concat('ab', 'cd') from simple_tab; > ERROR 42Y03: 'CONCAT' is not recognized as a function or procedure. > ij> select curtime() from simple_tab; > ERROR 42Y03: 'CURDATE' is not recognized as a function or procedure. > ij> select curtime() from simple_tab; > ERROR 42Y03: 'CURTIME' is not recognized as a function or procedure. > ij>