Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Are Oracle Varchar2 columns always case-sensitive?
Craig,
You can do this in the same way that developer 2000 handles case insensitive queries in forms
SELECT * FROM EMP WHERE UPPER(ENAME) = 'BLAKE' AND (ENAME LIKE 'Bl%' OR ENAME LIKE 'bL%' OR ENAME LIKE 'BL%' OR ENAME LIKE 'bl%');
The last part of the WHERE clause is performed first, making use of the index. Once the database finds an entry that begins with bl, it checks the UPPER(ENAME) = 'BLAKE' part of the statement, and makes the exact match.
Hope This Helps,
Neil
In article <388F31F0.FB5819F8_at_peopledoc.com>,
Craig Goldie <cgoldie_at_peopledoc.com> wrote:
> Is there any way of switching off the case-sensitiveness of the data
> held in VARCHAR2 columns? Fro example SQLServer7 seems to have
> case-sensitiveness as an install option.
>
> i.e. I want a query such as:
>
> SELECT * FROM EMPLOYEES
> WHERE NAME = 'FrEd'
>
> and have it return an employee whose name is 'Fred'.
>
> I realise I could do:
>
> SELECT * FROM EMPLOYEES
> WHERE UPPER(NAME) = UPPER('FrEd')
>
> but does this impose any performance hit?
>
> Thanks in advance,
>
> Craig
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Jan 27 2000 - 08:58:37 CST