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 -> Re: Y2k Problem with 7.3.4

Re: Y2k Problem with 7.3.4

From: Arjan van Bentem <avbentem_at_DONT-YOU-DAREdds.nl>
Date: Tue, 2 Mar 1999 19:52:49 +0100
Message-ID: <36dc3391$0$24213@newton>


Glenn Baron wrote
>What is the NLS_DATE_FORMAT as defined (or not) in your init.ora ?
>
>If 'dd-mon-yy' , or not explicitly set, then '01-Jan-00' (without the
>explicit RR mask)
>means '01-Jan-1900', and the Sql is correct

True, if one of to use to_char(end_date). But I really think it should *not* affect the order by in a select query, should it? If it would, then why does Oracle not sort dates fully alphabetically, like '01-Dec-99' < '01-Jan-99' due to the D in Dec and the J in Jan?

Or what if one was to use:

    select start_date
    from ...
    order by end_date;

The selected START_date has nothing to do with the END_date which is used in the order by. END-date is not printed anywhere, so why would Oracle use NLS_DATE_FORMAT on END_date? I would simply expect Oracle to sort date columns Y2k compliant! And I still believe it does.

Anyone who can execte the following for me?

    select to_date('01-JAN-1999', 'dd-mon-yyyy')     from dual
    union
    select to_date('01-JAN-2000', 'dd-mon-yyyy')     from dual
    union
    select to_date('01-JAN-1998', 'dd-mon-yyyy')     from dual
    order by 1;

Arjan. Received on Tue Mar 02 1999 - 12:52:49 CST

Original text of this message

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