Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Indirect Procedure call
On Thu, 21 Feb 2002 09:22:10 -0500, "R.A.Collins" <rcollins_at_packet.news.com>
wrote:
>Hi, I am new to Oracle and am porting some stored procedures from another
>DB. The problem I am having is this - Some of the procedures take in
>parameters and use those parameters as calls for other procedures. Is there
>a way to use a parameter as a indirect procedure call in the body of a
>procedure??
Tit depends on the Oracle-version. In 8i and up (I'm not sure in 8) you can do it like this :
PROCEDURE proc1
(
p_subproc IN VARCHAR2 , p_value IN VARCHAR2
p_value IN VARCHAR2
)
IS
BEGIN
dbms_output.put_line ( p_value ) ;
END ;
This will execute like this in SQL*Plus :
C012HOME:orcl>exec proc1 ( 'PROC2' , 'TESTING' ) ;
TESTING
Regards,
Terje Tysse
Received on Fri Feb 22 2002 - 04:28:12 CST