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: DBI:
error in delete where

 



jcarrott
New User

May 31, 2010, 12:55 PM

Post #1 of 1 (2367 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:


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;


Code
  

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?

 
 


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

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