Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: order by info_date
Puzzling, to my poor Pooh brain. The order you say you want appears to be ascending upon the actual (entire) date, but the descending qualifier should have given you 2000 prior to 1999, etc.
Two thoughts are either you have a problem with the underlying data, or a problem with your NLS_DATE_FORMAT on your client.
For the latter, search your registry for that value. It may be overridden, BTW, with the SET SESSION syntax.
For the former, revise your search to use either the MM/DD/YYYY or MM/DD/RRRR mask, and post the revised results.
HTH,
dvz
Rob Zwartjes wrote:
>
> 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
![]() |
![]() |