Archive for February, 2009

Case sensitive text comparison in SQL Server 2005

Posted on February 24, 2009. Filed under: MS SQL Server |

SQL Server’s default collation does case-incensitive text comparison. For example, the following query will return both ‘E1′/’e1′ SELECT * from tblProduct WHERE ProductName = ‘E1′ For case sensitive text matching you need to set the following collation after the column name SELECT * from tblProduct WHERE ProductName = ‘E1′ COLLATE SQL_Latin1_General_CP1_CS_AS

Read Full Post | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...

Follow

Get every new post delivered to your Inbox.