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: Possible Y2K trap in using DECODE?

Re: Possible Y2K trap in using DECODE?

From: Jurij Modic <jmodic_at_src.si>
Date: Thu, 14 Jan 1999 20:56:44 GMT
Message-ID: <369e59d3.7034655@news.arnes.si>


On Thu, 14 Jan 1999 11:36:33 +0200, "Grinberg L." <leon_at_grant.kharkov.ua> wrote:

>Jurij Modic wrote:
>I agree that it is unexpected but documented result.
>
>But you can try
>
> INSERT INTO destination_table (date_column)
> SELECT DECODE('31.12.2000', '00000000', to_date(NULL), -- !!!
> TO_DATE('31.12.2000','DD.MM.YYYY'))
> FROM DUAL;
>
>and you will get true datest.
>
>Good luck,
>
>Leon Grinberg leon_at_grant.kharkov.ua

Leon,

I could swear this was the firs thing I tried when I discovered this DECODE behaviour and I could swear the results convinced me that this was not a sollution - I've also written that in my reply to Erwin Dondorp <erwindon_at_wxs.nl>. However, when I tried this just now I can see that this realy is a cure - I obviously made a mistake in my first probe.

So I stand corrected - the "TO_DATE(NULL)" realy solves this DECODE problem.

Thanks,
Jurij Modic <jmodic_at_src.si>
Certified Oracle7 DBA (OCP)



The above opinions are mine and do not represent any official standpoints of my employer Received on Thu Jan 14 1999 - 14:56:44 CST

Original text of this message

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