Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Peculiar results from a simple looking query.

Re: Peculiar results from a simple looking query.

From: <ak_tiredofspam_at_yahoo.com>
Date: 25 Feb 2005 08:27:48 -0800
Message-ID: <1109348868.411262.183970@l41g2000cwc.googlegroups.com>


>> The Conversion requested by the CAST statement is in effect
throughout the life of that query and applies to that affected column however many times after the cast it is referenced. In effect you have created a virtual field named the same as the original, uncasted, one and the query is accessing that virtual one - hence 2 characters long, like it was redefined. ..<<

Not always.

In this thread, a litttle bit above, I posted an example with cast to DATE, and the query retrieving the original column, not the cast one

select c from aa where cast(c as date) < sysdate-1 C



30-jUn-2004
1 row selected Received on Fri Feb 25 2005 - 10:27:48 CST

Original text of this message

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