How to query a dupe.

  • Thread starter Thread starter Merlin
  • Start date Start date
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?
 
SELECT Part_Number,
Count(Product_ID) AS Product_ID_Count
FROM TableName
GROUP BY Part_Number
HAVING Count(Product_ID) >1 ;
 
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

Similar Threads

SQL Syntax for an update query 2
NESTED SUBFORMS, QUERIES 7
Sub-query 6
update queries 4
Delete query 1
Using Min to Calculate across a table 2
delete records help 1
Access Access 2003 Qry? Want Null to = 0 ... help? 0

Back
Top