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

Sep 20 2010 3:21 AM

How to use IN statement with ORDER BY asc/desc in ORACLE/SQL 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/SQL 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.


Answers (1)