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: <ethanpost_at_my-deja.com>
Date: Thu, 20 Jan 2000 03:41:51 GMT
Message-ID: <86605s$8rc$1@nnrp1.deja.com>


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

Original text of this message

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