Re: Please help

From: Jochen Van den Bossche <Jochen.Van-Den-Bossche_at_eurocontrol.be>
Date: Fri, 18 Dec 1998 08:16:41 +0000
Message-ID: <367A0F69.4B41_at_eurocontrol.be>


Solution to the not-using-index problem: If you ALLLWAYS require non case sensitivity, store all text in the database in upper (or lower), than you will only need upper() on the search_pattern (and an index on the allredy 'upper-ed'will be used.)

If you need case sensitive as wel as non case sensitive search: If you can live without indexes (slow), use the solution below. If not, you must sacrifice some database space: Store the normal text (with upper- and lowercase) in one column and the upper()-ed text in another one. Both columns can have an index that will be used (That is: I think they will...).

Nick B wrote:
>
> Use UPPER (or LOWER) on both sides of the LIKE statement:
>
> WHERE UPPER(name) LIKE UPPER(search_pattern)
>
> Be warned that this will NOT use any index on the 'name' column
>
> Steven wrote:
> >
> > hi,
> >
> > l'm using "LIKE" for for my search engine,
> >
> > May l know, is there any way to make the search result
> >
> > non case sensitive.
> >
> > e.g
> >
> > If my database's has a value named "Wood",
> >
> > when l do a search on this keyword "wood".
> >
> > " Wood" would be one of the potential answer.
> >
> > Thank You.
Received on Fri Dec 18 1998 - 09:16:41 CET

Original text of this message