Re: Problem with upper/lowercase search
Posted in 1998
Xavier Mertens wrote:
>
> Hi!
>
> Informix does make difference between lower/uppercase.
> How can I execute SQL request from an ESQL/C programm without case
> sensitivty?
>
> select name from customers where name = "John">
> should return:
>
> "john"
> "John"
> "JOHN"
> etC...
This one belongs in the FAQ if it is not there already (I actually
think that it is) four posts this month. Anyway if you have 7.3 you
can use the UPPER and LOWER SQL functions:
select name from customers where UPPER(name) = "JOHN";
If you do not have 7.3 you have to use brute force (there is an SPL
function in the IIUG archives, I think that June wrote it, but it is
not fast):
select name from customers where name matches "[jJ][oO][hH][nN]";
Art S. Kagel