Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Peculiar results from a simple looking query.
>> 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