CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
[SOLVED] DBD::Oracle::db do failed: called with 1 bind variables when 2 are needed

 



terrykhatri531
User

Aug 27, 2014, 2:21 PM

Post #1 of 3 (1299 views)
[SOLVED] DBD::Oracle::db do failed: called with 1 bind variables when 2 are needed Can't Post

Hi,

I am getting the subject error while executing the following statement :


Code
  
my @tables = qw!table1 table2 table3 table4!;
for my $ts (@tables){

my $sql = qq!
DECLARE
var_count INT;
SELECT COUNT(*) INTO var_count
FROM sys.all_tables WHERE OWNER = 'ANY_OWNER' AND table_name = ? ;
if var_count > 0 then
BEGIN
DROP TABLE ? ;
END;
!;

$dbh->do($sql,undef,$ts);

}


Any idea how can bind the same variable at 2 places, because that's what I need to do, any tricks workaround ?

Many thanks.

Terry


(This post was edited by terrykhatri531 on Aug 28, 2014, 5:03 AM)


FishMonger
Veteran / Moderator

Aug 27, 2014, 2:28 PM

Post #2 of 3 (1295 views)
Re: [terrykhatri531] DBD::Oracle::db do failed: called with 1 bind variables when 2 are needed [In reply to] Can't Post

Did you try:

Code
$dbh->do($sql,undef,$ts,$ts);



terrykhatri531
User

Aug 27, 2014, 2:57 PM

Post #3 of 3 (1292 views)
Re: [FishMonger] DBD::Oracle::db do failed: called with 1 bind variables when 2 are needed [In reply to] Can't Post

Thanks Ron, appreciate it !!

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives