Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Y2k Problem with 7.3.4
Hi Carl,
What you need to do is use a noprint column and then order by that column:
column sort_date noprint
select end_date, to_char(end_date, 'yyyymmdd') sort_date
from period_setup
order by sort_date desc
/
Good luck
Oracleguru
www.oracleguru.net
oracleguru_at_mailcity.com
Carl A. Dotger <dotman23_at_fast.net> wrote in article
<7bh5is$hkr$1_at_news1.fast.net>...
> When selecting back date related data from a table, Oracle seems to
natively
> order dates with respect to a two digit year. For Example:
>
> select end_date from period_setup
> order by end_date
>
>
> The above SQL returns something like
>
> 1-Jan-00
> 1-Jan-98
> 1-Jan-99
>
> Obviously, the '00' entries pertain to the year 2000 so this result set
is
> incorrect. Oracle support says that using the century specific date mask
> (ie. 'DD-MON-RR') will return the correct results and it really does seem
to
> work. The problem is that we have much source code that would have to
> change. I am interested in the lowest impact solution to this issue.
Please
> Help!
>
> TIA,
>
> Carl Dotger
>
>
>
>
>
>
>
Received on Tue Mar 02 1999 - 12:11:14 CST
![]() |
![]() |