Re: Case insensitive search with wildcards
Posted in 1998
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
Gustav Fyring wrote:
>
> Hi!
>
> I'm using informix 7.24 and try to search using wildcards.
>
> A wildcard search of the type
> SELECT * FROM table WHERE column LIKE "%String%"> works fine.
>
> A case-insensitive search of the type
> SELECT * FROM table WHERE column EQUALS [S s][T t][R r][I i][N n][G g]
> or something like that works too.>
> The problem is that I can't use LIKE with the wildcards
> combined with the brackets for case-insensitive searchs.
Use the Informix specific MATCHES clause it recognizes a subset of grep
style regular expressions:
SELECT * FROM table WHERE column MATCHES '[Ss][Tt][Rr][Ii][Nn][Gg]';
This is documented on the SQL Reference and SQL Syntax manuals.
Art S. Kagel