SQL Server Select Query to Find Duplicates within a file
Need a SQL Select query that will find duplicates within the same file on multiple columns. Table is called Products.
Two columns; Product_Code and Product_Source. Need to find all records that have multiple occurances of Product_Code + Product_Source.
For example;
Product_Code Product_Source
12345 A
12345 A ---> Duplicate
18888 A
18888 C ---> Not a duplicate record
44000 D
99999 C
99999 C ---> Duplicate
from Products
Group By Product_Code,ProductSource
Having Count(*) > 1