Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Making an Oracle Database Instance Case - Insensitive

Re: Making an Oracle Database Instance Case - Insensitive

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: 1998/01/03
Message-ID: <68k3iq$29i@mtinsc03.worldnet.att.net>#1/1

On 30 Dec 1997 18:19:00 GMT, "Nirav Saraiya" <nsaraiya_at_netright.com> wrote:

>I would like to make an oracle database use case insensitive data
>storage so that the following query will work
>
> select col1 from table1 where col1 = 'sanjay kumar'
>
> col1 may have 'SANJAY KUMAR' or 'Sanjay Kumar' but everything
>will be matched by the above select statement. There should be some
>switch/init parameter that I can set to make the database case insensitive.

I am not aware of any "switch" that you can use to control this behavior. There are a couple things I can suggest. The first is to use the UPPER() function in your where clause, however that may force a query to do a tablescan rather than use an index. My second idea would be to create a shadow column with the name in all-caps. This shadow column could easily be maintained by a trigger, and you could index on it as well.

Jonathan Received on Sat Jan 03 1998 - 00:00:00 CST

Original text of this message

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