RE: bind variables & dbms_sql in procedure/packages

  • From: "Jamadagni, Rajendra" <Rajendra.Jamadagni@xxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 31 Mar 2004 07:00:44 -0500

Jared,
 
it is doable and I have done that. The worst part is you have to
programmatically control everything it is it a pain in the
you-know-where. Luckily a year ago, I trashed all that code and went for
NDS ... 
 
Raj

  _____  

From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of
Jared.Still@xxxxxxxxxxx
Sent: Tuesday, March 30, 2004 5:01 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: Re: bind variables & dbms_sql in procedure/packages



IIRC, you can't do that. 

Consider the preparatory steps in using DBMS_SQL. 

parse a cursor, define and\/or bind the columns  and execute. 

An unkown number of parameters kind of precludes the use of DBMS_SQL. 

Better to use native dynamic SQL in this case IMO. 

That's not to say that there isn't a convoluted  method that could be
used 
to accomplish this with DBMS_SQL, I think it *could* be done. 

In the end though it would be very complex and offer no benefits over 
native dynamic sql, which would also execute faster. 

I'm not offering any proof.  Let someone else prove this is wrong, which
is 
much easier than me proving it is correct.  :) 

HTH 
Jared 

Other related posts: