Re: caseless select
Posted in 1999
From: heesters@copland.udel.edu (Nicholas Pieter Heesters Jr.)
>
>Is there a way, in Informix, I can do a caseless select? Something
>similar to a grep -i on a Unix box? I'm trying to find names in a
>database, but the users sometimes enter the query in caps or lower
>case or some combination. I'd like to do something like the following:
>
>select * from customers where last_name like "%$input%";>
>But, if last_name has Johnson, JOHNSON or johnson as values I could
>have $input = "john" and all three last_name values would be returned.
>Is this possible?
Yes. Depending on your version, which you forgot to tell us. Look for the
UPPER or lower (or even Initcap) function, i.e.
select * from customers where UPPER(last_name) like UPPER("%$input%");
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com