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: date data type and = operator

Re: date data type and = operator

From: Pete Johnson <P.Johnson_at_ste0426.x400.icl.co.uk>
Date: 1998/11/11
Message-ID: <364978f3.0@145.227.194.253>#1/1

Yep - your problem is the time. If you specify a literal and allow Oracle to convert it to a date then the time is set to 00:00:00 which will not match a database column with the time set.

Using TRUNC on the column effectively treats the time on the column as 00:00:00 and therefore can be used to match the literal (as suggested by Andrew) but beware - TRUNC will stop the select using an index.

Using the <, > or between operators is therefore more efficient. Received on Wed Nov 11 1998 - 00:00:00 CST

Original text of this message

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