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: Are Oracle Varchar2 columns always case-sensitive?

Re: Are Oracle Varchar2 columns always case-sensitive?

From: Neil Emery <neil.emery_at_virgin.net>
Date: Thu, 27 Jan 2000 14:58:37 GMT
Message-ID: <86pmet$9jl$1@nnrp1.deja.com>


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

Original text of this message

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