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

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


Oracle LazyDBA home page