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: Brett Neumeier <random_at_interaccess.com>
Date: 1998/02/18
Message-ID: <6cfsj7$chc$2@nntp3.interaccess.com>#1/1

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

Original text of this message

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