Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

"single-row subquery returns more than one row" in SQL Developer Query Result

2951778Mar 6 2017 — edited Mar 7 2017

I am running a complex SQL statement with individual fields and few complex CASE statements that sum up few values to come up with a score. When I try to export the output of this SQL, I am running into following error message:

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

01427. 00000 -  "single-row subquery returns more than one row"

I understand that this is something that comes up in SUBQuery scenario that retunrs > 1 value but I am uanble to understand why this happens when exporting the data.

Here is the sample SQL statement:

SELECT col1, col2..coln,

(CASE WHEN A = 'aaa' then 1 else 0 end+

CASE WHEN B = 'bbb' then 1 else 0 end+

CASE WHEN C = 'ccc' then 1 else 0 end) case_score

from tbl1, tbl2...tbln

<join cond>

This post has been answered by unknown-7404 on Mar 6 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 4 2017
Added on Mar 6 2017
5 comments
3,856 views