eSQL Case is throwing ORA-01427
Hi
I have a query which is throwing ORA-01427 at CASE. I am looking for a fix or alternate for this.
eg.,
SQL> select ename,case deptno when 20 then ( select dname from scott.dept where deptno=deptno )
when 10 then ( select distinct dname from scott.dept where deptno=deptno ) end from scott.emp;
select ename,case deptno when 20 then ( select dname from scott.dept where deptno=deptno )
*
ERROR at line 1:
ORA-01427: single-row subquery returns more than one row