Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Search by a specific date - how?????
Graham Leggett (graham_at_vwv.com) wrote:
: 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.
"columns" or "rows"?
: 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')
"Date" fields store the time as well as the date. Perhaps the R_REPORT_DATE field in the database actually has a time component as well, in which case there will be no match with your date. I suggest: "...where trunc(R_REPORT_DATE) =..."
I also suggest that "to_date" works better than "todate", for me.
-- -bn random_at_interaccess.com (PGP 2.6.2 public key available on request) "There is no .signature -- only ZUUL!"Received on Wed Feb 18 1998 - 00:00:00 CST
![]() |
![]() |