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!

How to return multiple values for THEN clause in an SQL CASE expression

User_B9XGOJul 22 2017 — edited Jul 22 2017

Hi all,

My code checks similar condition as below.

how can return multiple values for THEN in CASE.

I know that l_status stores only 1 value. But I want something like l_status = 'n','s'

I am using this case statement in the where condition.

If not CASE is there any other way that I can handle.

Please suggest.

---code

case

when

(l_eno is null and l_ename is null)

then

l_status = 'n'

(l_eno is not null and l_ename is not null)

then

l_status = 'n','s'

end

This post has been answered by User_B9XGO on Jul 22 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 19 2017
Added on Jul 22 2017
19 comments
3,430 views