Consult the Descartes/Bunce "Programming the Perl DBI" book. See the section about how to use '?' as a placeholder in your SQL text. You'll end up with code that looks a little bit like this:
my $sql = "begin run_proc(?, ?); end;"; my $sth = $dbh->prepare($sql, {ora_check_sql => 0}); ... # then, inside the loop that runs this thing lots of times... while (my ($foo, $blah) = whatever()) { $sth->execute($foo, $blah); } This code will result in a single parse call, and however many execute calls with different bind values you deem appropriate. (By the way, without the ora_check_sql setting, the prepare() method would cause Oracle to perform two parse calls instead of just one.) Cary Millsap Hotsos Enterprises, Ltd. http://www.hotsos.com Upcoming events: - Hotsos Clinic 101 in Sydney - Hotsos Symposium 2004, March 7-10 Dallas - Visit www.hotsos.com for schedule details... -----Original Message----- Benny Pei Sent: Wednesday, August 20, 2003 8:14 PM To: Multiple recipients of list ORACLE-L Hi, I know how to do it for regulard query statement but I wasn't sure how to do it with procedures and packages. I have this procedure. e.g. I have this procedure 'begin run_proc ('foo','blah'); end; ' the procedure will be called either in a perl script. How would I change it so that it uses bind variables? Because it will be executed many times every hour and every day. thanks, benny __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Benny Pei INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Cary Millsap INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).