troubleshooting Question

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

Avatar of Jack Seaman
Jack SeamanFlag for United States of America asked on
Oracle DatabaseSQL
13 Comments2 Solutions1481 ViewsLast Modified:
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
ASKER CERTIFIED SOLUTION
johnsone
Senior Oracle DBA

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros