Hi there,

still Derby newby which is digging through the documentatins but cannot
find wht he needs ...

trying to make a dum funtion MYFUNC  without any parameters returning a
number it gets via soem sql lookups. Any examples out there of how a
function is to be declared without parameters and how the java program
can do SQL against Derby ? So that I can use this function like

ij>  values myfunc;  


For the declaration I tried:
CREATE FUNCTION MYFUNC RETURNS BIGINT PARAMETER STYLE JAVA CONTAINS SQL
LANGUAGE JAVA EXTERNAL NAME 'com.xyz.DerbyFunctions.myfunc'

and got 
ij> CREATE FUNCTION TEST1 RETURNS BIGINT PARAMETER STYLE JAVA CONTAINS
SQL LANGUAGE JAVA EXTERNAL NAME 'com.xyz.DerbyFunctions.myfunc'; ERROR
42X01: Syntax error: Encountered "RETURNS" at line 1, column 23. 


So QUESTION:

1) How to make this CREATE FUNC call correctly ?
2) Is it possible to make a function so I do not need to add () for no
parameters
3) How to I do SQL against Derby in my Java static method ?!?!

Thanx
B-)



Reply via email to