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: Oracleguru, Suresh Bhat <oracleguru_at_mailcity.com>
Date: Tue, 02 Mar 1999 23:05:18 GMT
Message-ID: <01be6511$71306900$a504fa80@mndnet>


Arjan -

Glenn is correct. I tested by altering NLS_DATE_FORMAT in the session and then inserting the dates:

Here is the result:

SQL> select * from test order by 1;

_________________ To Quit, Type  Ctrl-C __________________
 

DATE1


01-jan-00         -- inserted under dd-mon-yy
01-mar-00        -- inserted under dd-mon-yy
12-dec-97	         --- ditto ---
12-dec-99                  --- ditto ---
01-feb-00        -- inserted under dd-mon-rr
12-dec-00       -- inserted under dd-mon-rr

Suresh Bhat

Arjan van Bentem <avbentem_at_DONT-YOU-DAREdds.nl> wrote in article <36dc3391$0$24213_at_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 - 17:05:18 CST

Original text of this message

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