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: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Wed, 26 Apr 2006 19:45:32 +0200
Message-ID: <e2obhd$uqk$1@news4.zwoll1.ov.home.nl>


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. -- Regards, Frank van Bortel

Top-posting is one way to shut me up... Received on Wed Apr 26 2006 - 12:45:32 CDT

Original text of this message

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