Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Index on Year of date field
or try between :
where date_col between to_date('1997.01.01','yyyy.mm.dd') and to_date('1997.12.31','yyyy.mm.dd')
this will help, because functions can be used on expressions. If you know the default date format, the to_date no needed. e.g. the default date format is 'yyyy.mm.dd', you can write :
where date_col between '1997.01.01' and '1997.12.31'
try before use, because time part of the date column can produce unexpected results
Levente Valent
lsoft_at_szabinet.hu
Neil Chandler wrote in message ...
>In article <34FBDBEC.63A1543C_at_camline.com>, Stephan Schaefer wrote:
>
>When there is a function against a column, Oracle will not use an
>index.
Received on Wed Mar 04 1998 - 00:00:00 CST