Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> dynamic pkg execution
Hi all,
I want to execute a list of functions in dynamic sql.
The list of the functions is stored in a table. With a cursor I get each function and execute it in a statement like this:
declare
cursor c_job_list select job_no, command from t_cmd; begin
for r_job in c_job_list loop v_cmd:='select '||r_job.command||'('||r_job.Job_no||') fromdual';
dbms_sql.parse(v_dyn, v_cmd, DBMS_SQL.NATIVE );
dbms_sql.define_column(v_dyn,1,v_retVal); v_back:=dbms_sql.EXECUTE(v_dyn); loop exit when dbms_SQL.FETCH_ROWS (v_dyn)=0; dbms_sql.COLUMN_VALUE(v_dyn,1, v_retVal); dbms_output.put_line(to_char(v_retVal)); end loop; end loop
This works fine on AUTONOMOUS_TRANSACTIONS.
My question is:
can I execute the function on a other way like select pkg.fk from dual ??
Received on Thu Jan 25 2001 - 01:52:23 CST
![]() |
![]() |