Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: sysdate & date columns
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
![]() |
![]() |