Tag Archives: case senstive search tsql

Case Sensitive Search

Occasionally you may find it necessary to perform a case sensitive search in your data.  Using the COLLATE statement in the WHERE clause will allow you search for the exact case sensitive string you are looking for.

SELECT
AccountName
, AccountDescription
FROM
dbo.Accounts
WHERE AccountDescription COLLATE Latin1_General_CS_AS LIKE 'A Comp%'

Thanks to SQLMagRef139579