Table of Contents

Microsoft - Microsoft SQL Server - SQL - Compare - Case Sensitive Comparison

Binary Checksum

SELECT NAME1 , zNAME1 FROM dbo.ztCusDedup
WHERE BINARY_CHECKSUM(name1)<> BINARY_CHECKSUM(zNAME1) AND PARTNER LIKE '%WGW'

Collate

SELECT NAME1 , zNAME1 FROM dbo.ztCusDedup
WHERE name1 COLLATE Latin1_General_CS_AS <> zNAME1 COLLATE
Latin1_General_CS_AS AND PARTNER LIKE '%WGW' 

Cast

SELECT NAME1 , zNAME1 FROM dbo.ztCusDedup
WHERE CAST(NAME1 AS varbinary) <> CAST(zNAME1 AS varbinary)
AND PARTNER LIKE '%WGW'