Sebastian,

I dont know if I understood this right, for this seems to be quite a simple
task. Or maybe I am overlooking something very obvious.

Select to_char('date field','YYYYMMDD') from Mytable
order by 1

Unless you dont want the date field displayed in that format in your
report, but still want it sorted in the fashion described above, in which
case :

column sortbydate noprint
Select to_char('date_field','YYYYMMDD') sortbydate, Date_field
from Mytable
order by 1

Hope I got this right.

Raj




                                                                                       
                                  
                    "DiFelice,                                                         
                                  
                    Sebastian"                To:     Multiple recipients of list 
ORACLE-L <[EMAIL PROTECTED]>        
                    <sebastian.difelic        cc:                                      
                                  
                    [EMAIL PROTECTED]>                Subject:     trying to order date 
chronologically                          
                    Sent by:                                                           
                                  
                    [EMAIL PROTECTED]                                                   
                                  
                                                                                       
                                  
                                                                                       
                                  
                    January 17, 2003                                                   
                                  
                    04:14 PM                                                           
                                  
                    Please respond to                                                  
                                  
                    ORACLE-L                                                           
                                  
                                                                                       
                                  
                                                                                       
                                  




Is there a way to order the result set of a query by date chronologically?
For example, I run a usage report for customers either monthly, quarterly,
semi annual or annually.  I need to return the result set chronologically
by
month and I cannot seem to find a way to do it.
Thanks for any help!

Sebastian DiFelice
Database Administrator
Thomson Corporation
Intelligence Data
(617) 856-1587


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to