Reputation: 6613
I have following query ,
select * from process where name like 'abc';
now the name can be abc or ABC or Abc or aBc , any combination ,
i can not use upper and lower function as this query gets passed to some another system which does not support such functions ,
Also, collate is not supported i.e. i can not do ,eg .
select * from process where name like 'abc' COLLATE SQL_Latin1_General_CP1_CI_AS
Is there any way to make this query case-insensitive without using upper and lower functions ?
Upvotes: 3
Views: 1937
Reputation: 1
this should work:
select * from process where name rlike '[aA][bB][cC]'
Upvotes: 0
Reputation: 66747
If we can't use:
Possibly combining all results:
select * from process where name in ('abc', 'aBc', 'ABc', 'aBC', 'abC', 'AbC', 'aBC', 'ABC')
Upvotes: 1