Avatar of Jack Seaman
Jack Seaman
Flag for United States of America

asked on 

PL/SQL error: ORA-01427: single-row subquery returns more than one row

Here is the code:

UPDATE sfbetrm
SET sfbetrm_ar_ind =
(SELECT fa_info.ok
FROM fa_info
WHERE sfbetrm_ar_ind NOT IN ('C', 'Y')
AND fa_info.ok = 'Y'
AND sfbetrm_pidm = fa_info.pidm)
WHERE '&&update' = 'Y' AND sfbetrm_term_code = '201620'
AND EXISTS
(SELECT 1
FROM fa_info
WHERE sfbetrm_ar_ind NOT IN ('C', 'Y')
AND fa_info.ok = 'Y'
AND sfbetrm_pidm = fa_info.pidm);

How can this be fixed?  Oddly, it had been working in the past.  We did update the Oracle level since it was last run.
The error is PL/SQL error: ORA-01427: single-row subquery returns more than one row.
Jack
Oracle DatabaseSQL

Avatar of undefined
Last Comment
Jack Seaman

8/22/2022 - Mon