Call procedure dynamically

2

Does anyone know a method for calling a procedure dynamically?

I'm creating a html / css / javascript screen in an oracle procedure. I created a table with the name of the procedures I want to call. That way when there is a new functionality in the system, I do not need to change the main code just add the procedure name to the table.

More or less this way

for c_dados in (select * from tabela where flag = 'S') loop

        htp.p('<div class="brick large" id="'||c_dados.id||'">');
      exxecute immediate 'begin'|| c_dados.nome_proc||'; end;';
         htp.p('</div> ');

     end loop;

However the immediate run does not work. Does anyone know of any other way?

    
asked by anonymous 08.07.2015 / 21:51

1 answer

1

bullshit my space was missing after begin

execute immediate 'begin '|| c_dados.nome_proc||'; end;';

    
08.07.2015 / 22:44