Jim,
The easiest way to check your update is to run the SELECT subquery on its own and see if it returns any rows.
If it doesn't then the criteria in your WHERE clause is not what it needs to be OR the data in the corresponding fields is not matching as you expect ('1' will not = '01' or ' 1').
If the SELECT does return rows, then the query you're using to test the success of the update is incorrect.
Jack
-----Original Message-----
From: Jim Thomas [mailto:oracledba-ezmlmshield-x60351592.[Email address protected]
Sent: Wednesday, April 30, 2008 9:52 AM
To: LazyDBA Discussion
Subject: RE: UPDATE STATEMENT QUESTION
Dear Lazy DBA's
Is there any reason why the update statement below would not work.
besides the usual suspects-
I have a po_number in pop_lines where po_line_number = 1 and The
description field is blank
I also have a, identical po_number and po-line_number in temp_pop_lines
where the description is populated.
I get no errors, 'update complete' and then I commit. Yet the change
does not seem to take.
Any ideas?? Thank You
Regards
Jim Thomas
1 update pop_lines p
2 set p.purchase_line_detail_descr = (SELECT
purchase_line_detail_descr
3 FROM temp_pop_lines t
4 WHERE t.po_number =
p.po_number
5 and t.po_line_number =
p.po_line_number)
6 ;
7 commit
8 ;
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
The information contained in this email message and any attachments is privileged and confidential and intended only for the recipient(s) or the employee or agent responsible for delivery of this message to the intended recipient(s). If you are not the recipient you may not copy or disclose the information, or act upon it, and you should delete it entirely from your email system. Please notify the sender that you received this email in error. The views expressed in this communication may not necessarily be the views held by the company.
Oracle LazyDBA home page