Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: to_date function
The problem is that you are forcing a full table scan because you have a
function on the field. Very inefficient. Instead use between.
So yes, the below will work; it is just inefficient.
Jim
"Volker Neurath" <neanderix_at_gmx.de> wrote in message
news:9voend$gfjkp$31_at_ID-29596.news.dfncis.de...
> Jim Kennedy wrote:
>
> >Yes, you can truncate the created_date, but that will force a full table
> >scan just to get the date component as of midnight.
>
> And what about:
>
> SELECT *
> FROM table
> WHERE
>
to_date(to_char(date_field,'dd/mm/yyyy'),'dd/mm/yyyy')=to_date('15/12/2001',
'dd/mm/yyyy')
>
> Volker
Received on Tue Dec 18 2001 - 20:13:20 CST