Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: A really strange problem
"Sergey M" <msu_at_pronto.msk.ru> writes:
> Hello!
>
> "Ilya Shambat" <ishambat_at_aol.com> wrote in message
> news:d02408fc.0206131235.2cabf009_at_posting.google.com...
> >
> > SQL> select * from casetext
> > 2 where createdate = '13-JUN-02';
>
> Try this query: select * from casetext where trunc (createdate) = to_date
> ('13-JUN-02', 'dd-mon-rr');
>
I think you need to be careful with the above example. If your db has
an index on createdate it won't be used because putting a function on
a column will cause oracle to skip any indexes it could use.
It is likely you are not getting any rows returned because you are really comparing with 13-JUN-2002 00:00:00. Maybe you could use
where createdate >= to_date('13-JUN-02', 'DD-MON-YY') and createdate < to_date('14-JUN-02', 'DD-MON-YY');
Tim Received on Sun Jun 16 2002 - 01:37:00 CDT
![]() |
![]() |