| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Indirect Procedure call
Thanks Daniel, that's what I will check out next...The originals were from
MS Sql Server and went something like "execute @state_proc ...params... ". This way we could add details by calling specific procedures. I thought there might be some sort of indirect calling convention but ... ohwell........... Thanks for your time. Ray C.
"damorgan" <dan.morgan_at_ci.seattle.wa.us> wrote in message
news:3C756583.FC929135_at_ci.seattle.wa.us...
> There may be a way but every attempt I just made returned ORA-00900
invalid SQL
> statement. Even an attempt to wrap it in native dynamic SQL.
>
> Here's what I would do.
>
> 1. Evaluate whether you really need to do it this way (likely you don't)
> 2. If you do ... look at the feature in packages called overloading which
> allows you to put many procedures inside of a package with the same name.
>
> Daniel Morgan
>
>
>
>
> Ray C wrote:
>
> > I'm sorry, I must not be clear... What I want to do is actually a call
> > totally new procedure using the value "param" as the name of the
procedure
> > rather than to pass the param through. I want to be able to call
different
> > procedures indirectly depending upon the value of the initial
procedure's
> > param value (which contains the exact name of the procedure to call)...
> >
> > Thanks for your help..Ray
> >
> > "damorgan" <dan.morgan_at_ci.seattle.wa.us> wrote in message
> > news:3C752935.B0527E16_at_ci.seattle.wa.us...
> > > The same way any procedure passes any parameter to any other
procedure.
> > >
> > > PROC xyz (param) IS
> > >
> > > BEGIN
> > > another_proc(param);
> > > END;
> > >
> > > Daniel Morgan
> > >
> > >
> > >
> > > "R.A.Collins" 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??
> > > >
> > > > e.g.
> > > >
> > > > CREATE PROCEDURE proc1
> > > > (
> > > > p_value1 in varchar2,
> > > > p_subproc in varchar2
> > > > )
> > > > as
> > > > BEGIN
> > > >
> > > > p_value1 := 3;
> > > >
> > > > -- redirection here such that the routine calls the procedure in
the
> > > > parameter p_subproc.
> > > > p_subproc (p_value1);
> > > >
> > > > END;
> > > >
> > > > Ray Collins
> > >
> > >
>
Received on Thu Feb 21 2002 - 16:07:38 CST
![]() |
![]() |