
jcarrott
New User
May 31, 2010, 12:55 PM
Post #1 of 1
(4518 views)
|
error in delete where
|
Can't Post
|
|
I have a Perl program that uses DBI, the select has been run and works fine. I have used the data from the input table, so now I want to delete that row of data. I use the following code:
$msg->send('smtp', 'smtp.ochsner.org'); ## delete the line from procure.RECPO2 $dbh->do("DELETE FROM procure.RECPO2 WHERE po_number = '" . $vPO . "' AND requester = '" . $vReqName . "' AND req_num = '" . $vSourDoc . "'") or die "Couldn't delete line: " . $dbh->errstr; The message is sent, but the DELETE fails with this message;
DBD::Oracle::db do failed: ORA-00904: "REQUESTER": invalid identifier (DBD ERROR : error possibly near <*> indicator at char 77 in 'DELETE FROM procure.RECPO2 WH ERE po_number = ' 1608501' AND <*>requester = 'FERRARO' AND req_num = '915053'') [for Statement "DELETE FROM pro cure.RECPO2 WHERE po_number = ' 1608501' AND requester = 'FERRARO' AND req_num = '915053'"] at reqNote2_sh line 116. Couldn't delete line: ORA-00904: "REQUESTER": invalid identifier (DBD ERROR: err or possibly near <*> indicator at char 77 in 'DELETE FROM procure.RECPO2 WHERE po_number = ' 1608501' AND <*>requester = 'FERRARO' AND req_num = '915053'') at reqNote2_sh line 116. I am missing something about using multiple variables. Can somebody help me?
|