Sql Oddity

From: Goulet, Richard <Richard.Goulet_at_parexel.com>
Date: Mon, 18 Jan 2010 15:26:08 -0500
Message-ID: <6B0D50B70F12BD41B5A67F14F5AA887F0392DD68_at_us-bos-mx022.na.pxl.int>


        Anyone ever seen this: A developer executes the following code in an Oracle 9i database (

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 and database we get a 1. Any ideas???

Dick Goulet
Senior Oracle DBA/NA Team Lead
PAREXEL International
900 Chelmsford St, Suite 310
Lowell, MA 01821

The information transmitted in this communication is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please destroy any copies, contact the sender and delete the material from any computer.

Received on Mon Jan 18 2010 - 14:26:08 CST

Original text of this message