Thursday, January 07, 2010

Case sensitive "=" or like clause in SQL Query analyzer

In your query in query analyzer - Put this next to the case sensitive word that you querying


COLLATE SQL_Latin1_General_CP1_CS_AS


For Ex  - 

select * from EntryMain where customer = 'XXXxxxxXXXX' COLLATE SQL_Latin1_General_CP1_CS_AS



Here XXXxxxxXXXX is case sensitive.


You can also set the Collation to default using system store procs permanently.