Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: sysdate & date columns
Gee Larry why didn't you come to me in the first place!
select * from table1 where date1 = to_date(sysdate, 'DD-MON-YYYY)
The value sysdate contains the time also, your date column is most likely exactly midnight, you need to do a to_date to get the time to midnight on sysdate.
You know where to find me.
-Ethan
http://www.freetechnicaltraining.com
In article <YTrh4.134$j4.7687_at_news.uswest.net>,
"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?
>
> Thanks
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Jan 19 2000 - 21:41:51 CST
![]() |
![]() |