Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Date Comparison
Steve Dirschel <steve_dirschel_at_cargill.com> wrote:
>Why do I not get 2 rows returned when I try the select * from dummy
>where a = '10-DEC-96' ? I realize I can do a "less than 11-DEC-96 and
>greater than 10-DEC-96" but it seems like I shouldn't have to do all
>of that typing.
You don't get any rows that are exactly equal to '10-DEC-96' because the value you're comparing to is assumed to be midnight, and the values in the table are the time that the inserts took place. What you want is
select * from dummy where trunc(a) = '10-DEC-96'; This will give you all values for that day.
-- Zev Sero Don't blame me, I voted for Harry Browne zsero_at_mail.idt.net zsero_at_technimetrics.comReceived on Fri Dec 13 1996 - 00:00:00 CST
![]() |
![]() |