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: Search by a specific date - how?????

Re: Search by a specific date - how?????

From: Chen Yongbiao <bchen_at_ctmakro.com.cn>
Date: 1998/02/20
Message-ID: <34ED6F7D.24B8ABD@ctmakro.com.cn>#1/1

Graham Leggett wrote:

> Hi all,
>
> I am having a very frustrating time trying to convince oracle to give me
> all the columns in a table where the date is a specific date.
>
> Please can someone put me out of my misery and solve the mystery of how
> it is done.
>
> I was given the following, and I was told it would work. It does not (it
> returns no rows. The date inside the query is returned from a previous
> query, so yes there are dates in the database):
>
> select * from REPORT where R_REPORT_DATE =
> TODATE('1998-02-03','yyyy-mm-dd')
>
> To the person who can see through what obvious error I will become
> eternally grateful!
>
> Regards,
> Graham
> --
> -----------------------------------------
> graham_at_vwv.com "There's a moon
> VWV Interactive over Bourbon Street
> tonight...

  It's very easy to do that:
select * from report
where to_char(r_report_date,'yyyymmdd')='19980203' Received on Fri Feb 20 1998 - 00:00:00 CST

Original text of this message

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