Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI query problem
First of all, capitalization is irrelevant in dates.
Seconly, I don't know why you are using the LOWER function for every
predicate. Likely it will force Oracle to conduct a full table scan on
your table. This means your application will be unscalable.
Thirdly -as documented- the default date format in Oracle is DD-MON-RR.
If you want to use a different date format you need to use *to_date*
(so birthdate= to_date('14-03-1975','dd-mm-yyyy') instead of to_char.
You should avoid <function>(<indexed column>) = <hardcoded literal>
ALWAYS.
You can change the default date format by issuing
alter session set nls_date_format='DD-MM-YYYY'
and read up on the docs on how to set it permanently.
Hth
-- Sybrand Bakker Senior Oracle DBAReceived on Tue Mar 14 2006 - 03:07:18 CST