SQL query to find the duplicates in a column in a table changing the column's collation to make sure that the duplicates check to case sensitivity.
use OPWBI
GO
WITH xx AS
(
SELECT ROWIDChar COLLATE SQL_Latin1_General_CP1_CS_AS AS name FROM CST_ITEM_COSTS cic
)
SELECT name, COUNT(name) AS dup_count
FROM xx
GROUP BY name
HAVING (COUNT(name) > 1)