Re: Case INsensitive search
Posted in 1995
A more generic way of doing this follows:
SELECT * from customer
WHERE name MATCHES "[A-Z][A-Z]*"
rmcall@on-ramp.ior.com
--------------------------------------------------------------------------------------
rafal@magna.com.au (Rafal Czerniawski) wrote:
>On way to get around it is to use MATCHES predicate.
>For example:
>SELECT *
>FROM customer
>WHERE name MATCHES "[Jj][Oo]..."
>Check the manuals for exact syntax.
>leblancs@tsagate.com (Sean LeBlanc) wrote:
>>We are using Informix as one of our database backends for a product of ours.
>>Practically all other db's support the function "upper" in embedded SQL, which
>>allows us to do a case insensitive search, but Informix seems to be lacking
>>this functionality. (*NOTE*: I called Informix tech support for Dynamic
>>Server, and they were not too helpful)
>>What I want to be able to do is, given criteria like "jones", I want to be
>>able to find stuff like "Jones", "JONES", "JoNeS", etc.
>>If anyone know a workaround that is somewhat sane, without building a huge
>>IN clause or the like, please enlighten me. I could use some enlightenment. :)
>>TIA,
>>............................................................
>>#include <smiley.h>
>>Sean LeBlanc - leblancs@tsagate.com
>>Quote o' the moment:
>>"You can't fight in here, this is the WAR room!"
>>#define STD_DISCLAIMER "My words are my own."
--------------------------------------------------------
Rob McAllister rmcall@on-ramp.ior.com
Spokane, WA
"On all good programmers a little core must dump"