Hi, in my UDB 8.2 I created an UDF that represents the builtin 'CURRENT DATE' function. It has the name 'TODAY' and is nothing more than a SQL expression UDF. When run in the Development center it returns today's date. But when incorporated in a SQL statement (in the Control Center or my application) like this:
Code:
SELECT * FROM TABLENAME WHERE LASTDATE < TODAY;
I get:
Quote:
SQL0206N "TODAY" is not valid in the context where it is used.
SQLSTATE=42703
|
It's executed by the same user as the owner of the UDF and according to the properties in the Control Center that user has EXECUTE privileges.
What's missing here?
Thanks in advance and greetings,
Hans