I changed my UDF to a table funtion.
However I can no longer call this UDF using
"select scramb.scrambfn('MICHAEL',0) from sysibm.sysdummy1"
I must now use
"select ta.*,tb.* from table ( scramb.scrambfnt('MICHAEL',0)) as ta "
This is ok - EXCEPT -
I need to call this multiple times
something like this :
$=> db2 "select ta.*,tb.* from table ( scramb.scrambfnt('MICHAEL',0)) as ta ,table ( scramb.scrambfnt('JOHN',0)) as tb"
However I get his error when I do.
SQL20267N The function "SCRAMB.SCRAMBFNT" (specific "SQL090610150002100")
modifies SQL data and is invoked in an illegal context. Reason code = "1".
SQLSTATE=429BL
Any suggestions?