How to query a dupe.

M

Merlin

I have a table with Product_ID and Part_Number

I want to find which (if any) Part_Number's have more then 1
Product_ID assigned.

I was thinking I could manage this with a relatively simple query but
I have had no success.

Any suggestions?
 
J

Jerry Whittle

SELECT Part_Number,
Count(Product_ID) AS Product_ID_Count
FROM TableName
GROUP BY Part_Number
HAVING Count(Product_ID) >1 ;
 
M

Michel Walsh

SELECT product_ID
FROM tableName
GROUP BY product_ID
HAVING COUNT(*) >1



Hoping it may help,
Vanderghast, Access MVP
 
Top