January 18th, 2012, 02:11 AM
I am a newbie to SQL. I need to know a way in which I can pass variable arguments to UDF? Below is the sample code:
for execute statement:str
into :val1, :val2
Here its obvious that only 2 values are passed to UDF 'fill', but if there are more arguments (that depends on the execute statement, like val1, val2, val3 etc) then how do I pass these into UDF? Please help.
January 20th, 2012, 12:38 AM
One solution will be do pass to the UDF only one string parameter that will contain all your values you want to send. Something like this:
cparatemerTosend = cast (val1 as varchar(50))||','||cast (val2 as varchar(50))||','||cast (val3 as varchar(50)).....
In this way you transfer the job to identify the parameters to the UDF.