karthik
karthik

Reputation: 15

Giving sub query returing too many rows error while i'm updating same table with using some values from table

The below query returning

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

UPDATE master 
   SET final = NVL(final,
              (SELECT 'Disconnect' 
                 FROM  (SELECT NVL(Ported_out_flag, type) as type, 
                               CASE WHEN order = 'C'  THEN 'C' ELSE service end service,
                               cdms
                          FROM master) 
                WHERE type in ('PORTED_OUT')
                  AND (service in ('C','I') or service is null)
                  AND cdms in ('FR','IS','RE','QU')
              )
             );

Can anyone help me here?

Upvotes: 0

Views: 26

Answers (0)

Related Questions