Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: date data type and = operator
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