Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
$row->{'SQL'} contains the sql I want to execute for the sub query, $row->{'REC_NO'} contains a unique integer. I get error DBD::Oracle::st execute failed: called with 2 bind variables when 1 are needed. Please advize how to use place holders properly with a sub query. TIA$sth=$dbh->prepare("Update Customers set RESULTS =('?') where rec_no=? +"); foreach my $row ( @rows ) { $sth->execute($row->{'SQL'},$row->{'REC_NO'}) or die $dbh->errstr +; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI place holder for sub query problem
by dsheroh (Monsignor) on Jan 02, 2008 at 16:55 UTC | |
by Anonymous Monk on Jan 02, 2008 at 17:00 UTC | |
|
Re: DBI place holder for sub query problem
by jZed (Prior) on Jan 02, 2008 at 19:08 UTC | |
|
Re: DBI place holder for sub query problem
by jettero (Monsignor) on Jan 02, 2008 at 16:36 UTC | |
by Anonymous Monk on Jan 02, 2008 at 16:52 UTC | |
by jettero (Monsignor) on Jan 02, 2008 at 18:09 UTC | |
by olus (Curate) on Jan 02, 2008 at 22:06 UTC |