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 statement in order by clause

santhosh.shivaramJul 13 2009 — edited Jul 13 2009
Hi,
I have written the below query which is having CASE statement in ORDER BY clause. Please let me know what mistake i have done in the query because am getting "Missing Keyword" Error.

SELECT opn_quest_id, seq_nbr
FROM opinion_question
order by case when :p=1 then
opn_quest_id,seq_nbr
else
opn_quest_id
end;

Thanks,
Santhosh.S
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 10 2009
Added on Jul 13 2009
5 comments
11,369 views