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

Home -> Community -> Usenet -> c.d.o.server -> Re: Is this possible with "execute immediate"

Re: Is this possible with "execute immediate"

From: Jeremy <jeremy0505_at_gmail.com>
Date: Wed, 26 Apr 2006 19:08:52 +0100
Message-ID: <MPG.1eb9c78fa43d739598a19d@news.individual.net>


In article <e2obhd$uqk$1_at_news4.zwoll1.ov.home.nl>, Frank van Bortel says...
> Jeremy wrote:
> > In article <e2j44j$u4h$1_at_news5.zwoll1.ov.home.nl>, Frank van Bortel
> > says...
> >
> >> Something along the line of:
> >> declare
> >> g_proc varchar2(40) := 'vr.procname';
> >> g_name varchar2(40) := 'l_name';
> >> begin
> >> execute immediate (
> >> ':l_procname(p_id=>1,p_name=>:l_name'
> >> )
> >> using g_proc, g_name;
> >> end;
> >>
> >> ?
> >>
> >
> >
> > Not sure exactly waht you're getting at here Frank - doesn't that just
> > literally pass the string value 'l_name' into the p_name param of
> > vr.procname?
> >
> > I need to find a way to pass an array param to a stored procedure using
> > some form of dynamic SQL. Perhaps it is not possible with "execute
> > immediate" - perhaps only with DBMS_SQL?
> >
>
> 1) It uses bind variables.
> 2) it passes the value (contents) of g_name (in this example
> that would be "l_name" indeed).
> 3) Haven't tested with arrays, but here's your framework; pass the
> array.
>

Don't know if you've seen my other posts following up on this but it seems you cannot do it unless the type of the variable (l_name in this case) is a SQL type. So I created a type vc2000_array and used that definition for l_name - and got successful compile. Then I discovered my next set of issues under the thread "Passing array values into pl/sql procedure via a URL" :(

cheers!

-- 

jeremy
Received on Wed Apr 26 2006 - 13:08:52 CDT

Original text of this message

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