Tuesday, April 12, 2005

Case Sensitive Search in MSSQL

If you wanna get the Column Value from the Table With CaseSensitive
--------------------------------------------------------------------
SELECT * FROM TABLENAME
WHERE CONVERT(VARBINARY(50),COLUMNNAME) = CONVERT(VARBINARY,'COLUMNVALUE')

SELECT * FROM Employee
WHERE CONVERT(VARBINARY(50),EmpName) = CONVERT(VARBINARY,'SaNkar')

This query will return exact match of SaNkar.

No comments: