Re: Case-Insensitive search
Posted in 1998
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
iftikhar_khan@mailcity.com wrote:
>
> Hi Everybody
>
> Can we make a case insensitive search in Informix? Example when I say SELECT
> * FROM mytable WHERE mycol1 = "TEST" It makes case sensitive match of mycol1
> with "TEST" and brings the matching records. But I want all records with any
> word test like "TEST", "test", "TEst" etc.
For versions < 7.3 only brute force will do:
SELECT *
FROM mytable
WHERE mycol1 matches "[Tt][Ee][Ss][Tt]";
-OR-
SELECT *
FROM mytable
WHERE mycol1 IN ("test", "Test","TEst","TESt"................);
Art S. Kagel