What do you mean "catch"?
Anyway, to delete duplicate rows, this is the typical solution:
; WITH numbering AS (
SELECT *, rn = row_number() OVER(PARTITION BY keycol ORDER BY something DESC)
FROM tbl
)
DELETE numbering
WHERE rn > 1
In the PARTITION BY column, you list the column(s) where you don't want duplicates. In the ORDER BY clause you have the criteria for which row to keep. I added DESC, since commonly it is a date column, and you want to keep the most recent row.
If you only want to view duplicate rows, you can do:
; WITH cnts AS (
SELECT *, cnt = COUNT(*) OVER(PARTITION BY keycol)
FROM tbl
)
SELECT * FROM cnts WHERE cnt > 1