Re: Searching case-insensitively
Date: 1996/07/05
Message-ID: <31dd8c64.2136350_at_n5.gbso.net>#1/1
Simon Mercer <mercer_at_mpimg-berlin-dahlem.mpg.de> wrote:
>I have a problem which I wonder if anyone can help me with - I have the
>feeling the answer is quite simple.
>
>I have a table with two fields, 'ID' and 'name' with maybe 2 million
>records, and I want to conduct a search on the contents of the 'name'
>field. This field can contain any alphanumeric string, often with a
>mixture of upper and lower case characters. What is the best way to
>search this table case-insensitively?
>
>Two related issues which perhaps someone can also answer;
>
>Is there a SET option or similar switch to make case-insensitive
>searches the default?
No
>
>Does the construct 'WHERE UPPER(search_term) = UPPER(name);' prevent the
>search from using indices?
That's the only way to do it that I know of. And it will prevent the use of indices.
-- Chuck Hamilton chuckh_at_dvol.com Never share a foxhole with anyone braver than yourselfReceived on Fri Jul 05 1996 - 00:00:00 CEST