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

About AussieBICG

Connect with me here https://au.linkedin.com/in/aussiebicg

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s