Question : UPdate table column + PL/SQL

Hi, I have a question, I have an update query that listed below. It give me an error : 'single-row subquery returns more than one row." Can anyone give me an hint why?

UPDATE table1 SET SVC_CD = 'ABC'
      where BD_NR = (
            select A.NVP_BID_NR from table1  A, table2  B WHERE A.FG_NR = B.FG_NR
              AND A.BD_NR = B.BD_NR
                         AND A.C_CD = 'OU' )

Answer : UPdate table column + PL/SQL

That's because ur inner SELECT query returned more than 1 row for a single row of the table being updated. Since Oracle found multiple rows returned, it couldn't have updated the source table correctly and hence, threw the exception.
Random Solutions  
 
programming4us programming4us