Knut Stolze <stolzede.ibm.com> wrote in message news:<bfikun$2fc$2fsuj29.rz.uni-jena.de>...It was created by running the CREATE FUNCTION in the Command Center. I> 3W <trefork> wrote:
>>> > I have created a UDF that takes an INTEGER as parameter and returns a
> > VARCHAR. Whenever I try to use the function in a SELECT, it causes the
> > SELECT to return an empty result set.
> How does your function look like (code)?
> How was it registered in the database (CREATE FUNCTION)?
> How do you try to call it?
have verified that it was created, by using Control
Center->Database->Application Objects->User defined functions. It's
there, looking correct.
My select statement:
select isLeapYear(1976) from SomeTable
create function isLeapYear(testYear integer)
no external action
if ( mod(testYear, 4) = 0 ) then
if ( mod(testYear, 100) = 0 ) then
if ( mod(testYear, 400) = 0 ) then