Skip to Main Content

SQL & PL/SQL

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!

decode for EXISTS and NOT EXISTS conditions

Kum KApr 13 2011 — edited Apr 13 2011
Hello all,

I need to use either EXISTS or NOT EXISTS before the subquery based on the situation. I have written a test query but its erroring out. Please check it.


select 1 from dual
where DECODE('A','A',EXISTS ,NOT EXISTS)
(select ename from EMP
where ename = 'SCOTT')

Thank You

KK
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 11 2011
Added on Apr 13 2011
7 comments
4,445 views