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: sysdate & date columns

Re: sysdate & date columns

From: Peter L <news_at_abc.co.uk>
Date: Thu, 20 Jan 2000 18:08:22 GMT
Message-ID: <3886c197.731785@news.freeserve.net>


On Wed, 19 Jan 2000 16:46:51 -0700, "Larry Pettit" <larry.pettit_at_ps.net> wrote:

>
>This doesn't work.
>
> select * from table1 where date1 = sysdate
>Is there a way to compare a date column with sysdate other than
>converting both using to_char()?
>
>I think the time part of the date is causing this not to work, any
>suggestions?
>

Our policy is to always apply trunc to dates we're storing on the database unless the time element is actually needed. That way you can use

where date1 = trunc(sysdate) etc

and the index is still OK. Received on Thu Jan 20 2000 - 12:08:22 CST

Original text of this message

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