RE: Sql Oddity

From: Goulet, Richard <Richard.Goulet_at_parexel.com>
Date: Mon, 18 Jan 2010 16:03:59 -0500
Message-ID: <6B0D50B70F12BD41B5A67F14F5AA887F0392DEB8_at_us-bos-mx022.na.pxl.int>



Thank you all, that seems to have done it. If I set the date back more that 0.125 from the current sysdate it works as advertised. Therefore it has to have something to do with the timezone.

Dick Goulet
Senior Oracle DBA/NA Team Lead
PAREXEL International

-----Original Message-----
From: Stephane Faroult [mailto:sfaroult_at_roughsea.com] Sent: Monday, January 18, 2010 3:52 PM
To: ilmar.kerm_at_gmail.com
Cc: oracle-l_at_freelists.org; Goulet, Richard Subject: Re: Sql Oddity

Exactly my thought - I was just checking the docs when Ilmar answered, SYSTIMESTAMP returns a TIMESTAMP WITH TIMEZONE, not a TIMESTAMP.

Stephane Faroult
RoughSea Ltd <http://www.roughsea.com>
RoughSea Channel on Youtube <http://www.youtube.com/user/roughsealtd>

Ilmar Kerm wrote:
>
>
> On Mon, Jan 18, 2010 at 10:26 PM, Goulet, Richard
> <Richard.Goulet_at_parexel.com <mailto:Richard.Goulet_at_parexel.com>>
wrote:
>
> Folks,
>
> Anyone ever seen this: A developer executes the following
> code in an Oracle 9i database (9.2.0.6)
>
> create table test_date_drop_me (test_column timestamp default
> sysdate);
>
> insert into test_date_drop_me values (sysdate);
>
> select CASE WHEN systimestamp> t.test_column THEN 1 ELSE 0 END
> from test_date_drop_me t;
>
> He gets a 0 each time the final select statement is excecuted no
> matter what the value in the table. In a 10.2.0.4 and 11.1.0.7
> database we get a 1. Any ideas???
>
> */
> /*
>
> Could it be related to different time zones for the client and server?
>
> --
> Ilmar Kerm
> Sent from Tallinn, Harjumaa

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jan 18 2010 - 15:03:59 CST

Original text of this message