Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> SQL ORDER BY Question

SQL ORDER BY Question

From: <khs_at_netset.com>
Date: Thu, 02 Sep 1999 01:32:47 GMT
Message-ID: <37cdd18f.121019@news.netset.com>


Ok, I want to include a column (lets call it X) in my ORDER BY clause of a SELECT statement but I have a problem with the data.

For column X:

Values '1' and '5' represent Army
Values '2' and '6' represent Navy
Values '3' and '7' represent Marines and
Values '4' and '8' represent AirForce

I want to order the results by X (service) but if I do this I'll get all the '1's then '2's, '3's, '4's and then 5,6,7,8. I won't get all the Army (or any other service) rows together like I want. Is there some way to make this sort like I want without changing the column values?

Thanks in advance....
You can email me at JAMES.STRICKLAND_at_dfas.mil Received on Wed Sep 01 1999 - 20:32:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US