Pradeep Pradeep - 7 months ago 16
SQL Question

sql not case sensitive query without using upper or lower function

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 ?

aF. aF.
Answer

If we can't use:

  1. lower or upper
  2. assing case insensitive collate

Possibly combining all results:

select * from process where name in ('abc', 'aBc', 'ABc', 'aBC', 'abC', 'AbC', 'aBC', 'ABC')