View Single Post
 
Old September 20th, 2010, 02:22 AM
arbab arbab is offline
Authorized User
Points: 350, Level: 6
Points: 350, Level: 6 Points: 350, Level: 6 Points: 350, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2008
Location: , , Pakistan.
Posts: 54
Thanks: 8
Thanked 1 Time in 1 Post
Default How to use IN statement with asc/desc in ORACLE queries?

How to use IN statement with asc/desc in ORACLE queries?

Following queries worked properly, which are without IN statement:


1-SELECT ROLE,NAME,INSTITUTION
FROM ROLE
ORDER BY INSTITUTION ASC


2-Select Error, NAME,DESCRIPTION,FILE,CATEGORY
from errorcodes ORDER BY CODE ASC;

but when I use ORACLE query with IN it gives error, the query is:

3-SELECT *
FROM CUST
WHERE ORDER BY Channel IN ('0007', '9999','0001') ASC;

How can I write the above query properly?

Thanks in advance.
__________________
How to do programming?