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: to_date function

Re: to_date function

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Wed, 19 Dec 2001 02:13:20 GMT
Message-ID: <4JST7.4735$xl6.723452@rwcrnsc54>


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

Original text of this message

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