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!

case with subquery in then part

631222Aug 24 2008 — edited Aug 24 2008
Hi,

I want to write a case statement that will return more than one value.

At present I am using this but it is not working


SELECTION * FROM PROJECT WHERE
PROJECT_ID IN
(CASE
WHEN CONDITION < 7 THEN CONDITION
WHEN CONDITION = 7 THEN ( SELECT PROJECT_ID FROM PROJECT WHERE PROJECT_STATUS LIKE 'OPEN%'
ELSE (SELECT SELECT PROJECT_ID FROM PROJECT WHERE PROJECT_STATUS LIKE 'CLOSED%')
END)


When I run this i get error :
Encountered the symbol "CLOSED" when expecting one of the following: * & = - ; < / > at in is mod remainder not rem <> or != or ~= >= <= <> and or like like2 like4 likec between || multiset member submultiset+

Please help me ... what need to do to correct the code
This post has been answered by JustinCave on Aug 24 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 21 2008
Added on Aug 24 2008
3 comments
562 views