db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: substring/concat/curdate/curtime
Date Sat, 02 Sep 2006 22:18:08 GMT
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> 



Mime
View raw message