Re: Dynamic stored procedure?
From: Garry M. Filimonov <garry_at_fly.triniti.troitsk.ru>
Date: 1996/08/21
Message-ID: <01bb8f72$136bdba0$bf0000c5_at_Garry.triniti.troitsk.ru>#1/1
Date: 1996/08/21
Message-ID: <01bb8f72$136bdba0$bf0000c5_at_Garry.triniti.troitsk.ru>#1/1
Next working:
set serveroutput on
declare
cur INTEGER ;
ret INTEGER ;
your_proc VARCHAR2(100) := 'Dbms_Output.Put_Line(''Hello, World!'');' ;
test varchar2(200) := 'BEGIN ' || your_proc || ' END;' ;
begin
cur := Dbms_Sql.Open_Cursor ;
Dbms_Sql.Parse( cur, test, Dbms_Sql.v7 ) ;
ret := Dbms_Sql.Execute( cur ) ;
Dbms_Sql.Close_Cursor( cur ) ;
end;
/
Instead 'Dbms_Output.Put_Line(''Hello, World!'');' use your 'get_emp_salary';
-- G'luck ! ----------------------------------------- Garry M. FIlimonov LASU TRINITI, Troitsk, MO, Russia garry_at_triniti.troitsk.ru Mark Styles <lambic_at_msn.com> wrote in article <4vf3uq$21d_at_pheidippides.axion.bt.co.uk>...Received on Wed Aug 21 1996 - 00:00:00 CEST
> Can anyone tell me if its possible to call a stored procedure when the
> name of the procedure is held in a variable?
>
> e.g:
>
> declare
> test varchar2(20) := 'get_emp_salary';
> begin
> execute(test);
> end;
> /
>
> I tried using dbms_sql to do this, but it only recognises standard SQL.
>
>
>