Thanks, All - the DECODE works. The one I was trying to figure out was incorrect.
happy Friday!
-----Original Message-----
From: Keith Williams
[mailto:oracledba-ezmlmshield-x98621567.[Email address protected]
Sent: Friday, February 25, 2005 16:07
To: LazyDBA Discussion
Subject: RE: ORDER BY
Just use decode:
order by decode(llTimeZone,'AST', 1, 'EST', 2, 'CST', 3, 'MST', 4, 'PST', 5, 'HST' 6, 7)
-----Original Message-----
From: Randall TJ
[mailto:oracledba-ezmlmshield-x97686042.[Email address protected]
Sent: Friday, February 25, 2005 2:49 PM
To: LazyDBA Discussion
Subject: ORDER BY
I am getting a result set that includes time zone, and I would like to sort a result set by a specified order of time zones.
SELECT llOpenCases, llTimeZone
FROM LL_HOUSEHOLD
ORDER BY llTimeZone
Gives me AST, CST, EST, .....
Is it possible to define in the ORDER BY clause, the time zones going from AST -> HST? My desired order is: AST, EST, CST, MST, PST, HST
Thank you!!
T.j.
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html
IMPORTANT NOTICE:
The information contained in this transmission is confidential. If you are not the intended recipient, you must not use or disseminate the information herein. If you have received this transmission in error, please immediately notify the sender and permanently delete/destroy the original you received as well as any copies/printouts thereof. Although this transmission has been scanned for viruses/defects that might negatively impact any system into which it is received, it is the responsibility of the recipient to ensure that this transmission is, indeed, free of viruses/defects and no responsibility is accepted by the sender, Troux Technologies, Inc., its subsidiaries or affiliates, either jointly or severally, for any loss or damage arising in any way from use of this transmission.
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page