suppose I have a list of procedures p1,p2,p3..pn , each procedure has only one output number parameter, basically each procedure is a constant number. How could I create a loop that runs all these procedures and the results are displayed on the screen? I tried with EXECUTE IMMEDIATE something like:
DECLARE
i number;
n number:=5;
print number;
begin
for i in 1 .. n loop
EXECUTE IMMEDIATE 'BEGIN p'||i||'('||print||') END;' ;
dbms_output.put_line(print);
end loop;
end;
I also tried the form [EXECUTE IMMEDIATE sql_stmt INTO print USING i]
but I still haven't done anything