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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top