Hi,
I created a DB2 stored procedure as
Create Procedure DB2INST1.KPI_JOINS_PROC1 (in Calc_Str Varchar(3000), out Output_Query Varchar(3000))
I did all the processing and At the end I added
Set Select_final = 'Select '|| sel_full_var || ' from ' || Tab_full_var || ' where ' || Join_Str;
Set Output_Query = Select_final;
Return (Output_Query);
Commit;
End@
I'm getting an error : SQL 0058N The datatype of the requrn statement value in an SQL procedure must be integer. I want to return a varchar.
I searched in all the past topics in this forum and I couldnt get my error cleared. Please help me out.
thanks,
Kayal.