当我使用表中的某些值更新同一表时,给子查询重整太多行错误

时间:2018-08-22 15:58:22

标签: oracle ora-01427

下面的查询返回

  

ORA-01427:单行子查询返回多个行

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')
              )
             );

有人可以在这里帮助我吗?

0 个答案:

没有答案