Re: SET statement in a stored procedure Serge Rielau wrote:
> Szymon Dembek wrote:
>> To make it possible to do updates, inserts and deletes in an UDF, you
>> have to declare it with "MODIFIES SQL DATA". But unfortunatelly it
>> works only in case of a table function and not in case of a scalar
>> function (according to db2 doc).
>>
>> May I hope this limitation will get worked around sooner or later ?
> I think one of major obstacles to lift this restrictions is my humble
> self ;-)
> MODIFYING SQL DATA within a query is an inherently dangerous thing.
You're totally right, I keep forgetting that UDF is inline SQL actually...
I'm porting some Sybase ASA udf's to db2 and they work quite differently
in Sybase - you can do updates, you have in and out parameters... Quite
frankly - I can't tell the difference between function and procedure in
sybase (except from return value) - but I'm a total newbie in regard to ASA.
Best regards
--
Szymon Dembek |