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

Home -> Community -> Usenet -> c.d.o.tools -> order by info_date

order by info_date

From: Rob Zwartjes <rzwartje_at_robz.HOSTNAME>
Date: 2000/06/10
Message-ID: <slrn8k4du7.4kq.rzwartje@rob.home.nl>#1/1

Hello there,

probably this question has been asked already but couldn't find the answer so here it is again :)
I have a field in my table wich contains the date as 'mm/dd/yy'. The data is inserted into oracle via to_date('12/29/99','mm/dd/yy'). Now I want to sort this data so that 01/01/99 comes before 01/02/99 ... 01/02/00 etc. When I use ( after much searching :) ) :

        order by info_date desc;
I get:

	01-feb-99
	01-jan-99
	01-apr-00
	01-mar-00
	etc.

The order I want is:
	01-jan-99
	01-feb-99
	01-mar-00
	01-apr-00

The order function is working on 'yy' but also on 'mm'. How can I order desc on 'yy' and order asc on 'mm' and 'dd'.

Thanks in advance for your time,
Rob Received on Sat Jun 10 2000 - 00:00:00 CDT

Original text of this message

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