I have req such that , i need to call a procedure inside another using dynamic sql.
there is permanent table, which has procedure column, which will be loaded from java.
Once it is loaded a report procedure will be called through perl script.
In that procedure , based on the values in the procedure column, i need to call using dynamic sql.
replace procedure report()
sel proc into var1 from tbl1;
set var2='call '||var1 ||'()';
The above code is valid? will we be able to call a procedure inside another using dynamic sql.
Dynamic SQL doesn't support CALL.
The only workaround is a huge CASE which list all CALLs to those different SPs.