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

Re: sysdate and date columns

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Thu, 20 Jan 2000 19:19:30 +0800
Message-ID: <3886EF42.7A94@yahoo.com>


Michel Cadot wrote:
>
> Maybe:
> select * from table1 where trunc(date1) = trunc(sysdate)
>
> --
> Have a nice day
> Michel
>
> Larry Pettit <larry.pettit_at_ps.net> a écrit dans le message :
> yTrh4.133$j4.7298_at_news.uswest.net...
> >
> > 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?
> >
> > Thanks
> >
> >

...although

select * from table1 where date1 between trunc(sysdate) and trunc(sysdate)+0.99999

would be a better candidate for indexing benefits...

HTH
--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Thu Jan 20 2000 - 05:19:30 CST

Original text of this message

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