RE: Updating Table using select/ ORA-01427: single-row subquery returns more than one row error

RE: Updating Table using select/ ORA-01427: single-row subquery returns more than one row error

 

  

Check your data....is it possible more than one row in one of the tables is satisfying your WHERE clause? In other words, you don't have a one row for one row match between the two tables.



-----Original Message-----
From: Jim Thomas [mailto:oracledba-ezmlmshield-x38064319.[Email address protected]
Sent: Monday, April 28, 2008 1:47 PM
To: LazyDBA Discussion
Subject: Updating Table using select/ ORA-01427: single-row subquery returns more than one row error

Dear Lazy Dba's



Thanks to a couple of subscribers I was able to get the query
constructed properly

However now I am getting the:



ORA-01427: single-row subquery returns more than one row



I know what it is saying and I have tried a couple of fixes using the IN

operator. But I am still getting the same results- If anyone could

afford me a small portion of your valuable time, please review the query
below

and suggest to me where I may be wrong.



Original Query:



1 update jpt_pop_lines j

2 set purchase_line_detail_descr=(select purchase_line_detail_descr

3 from temp_pop_lines t

4 where t.po_number=j.po_number

5* and
t.po_line_number=j.po_line_number)

SQL> /

set purchase_line_detail_descr=(select purchase_line_detail_descr

*

ERROR at line 2:

ORA-01427: single-row subquery returns more than one row



I have used the IN statement in a variety of ways but I get the same
results-



If you can possibly manage the time for a response I will greatly
appreciate it.



Thank You

Regards

Jim Thomas



---------------------------------------------------------------------
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