Re: ORACLE DATE IN WHERE CLAUSE PROBLEMS
Date: 1995/06/30
Message-ID: <Pine.SUN.3.91.950630133237.14362C-100000_at_seatimes>#1/1
On Wed, 28 Jun 1995, John Carlson wrote:
> In article <3soo7s$174_at_dns.crocker.com>, davor_at_crocker.com says...
> >
> >What's more, if I have the gaul to use the BETWEEN...AND... operator, my
> >charming little ORACLE SERVER tells me I have 25 matches, as seen here:
> >
>
> I'm not positive but I think your problem is related to the numerical value of the
> dates you are selecting. Try using 'YYMMDD' as the date structure and then the
> numerical compare will be correct.
Nope. The problem is that the first query is using the '<' and '>' operators which exclude the begin and ending dates (exlusive). [Actually may include the beginning if the time piece is greater than 00:00:00.]
Between uses the begin and end dates (inclusive). However, since no time was specified on the ending date it too will exclude anything with a time portion greater than 00:00:00.
I suspect all the dates in question are defaulting to a time portion of 00:00:00 so it boils down to exclusion versus inclusion of the begin and end dates.
+----------------------------------------------------+ | Steve Butler Voice: 206-464-2998 | | The Seattle Times Fax: 206-382-8898 | | PO Box 70 Internet: sbut-is_at_seatimes.com | | Seattle, WA 98111 Packet: KG7JE_at_N6EQZ.WA | +----------------------------------------------------+All standard and non-standard disclaimers apply. All other sources are annonymous. Received on Fri Jun 30 1995 - 00:00:00 CEST