Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> dynamic pkg execution

dynamic pkg execution

From: <wolfgang.ludewig_at_systor.com>
Date: Thu, 25 Jan 2001 08:52:23 +0100
Message-Id: <10751.127439@fatcity.com>


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||') from
dual';

            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

end;

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US