Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting duplicated and unduplicated records

Status
Not open for further replies.

kkarren

Technical User
Mar 30, 2000
33
US
I have a database that I would like to write one query that will give me a count of duplicated records and unduplicated records. IE 15 different names have appeared 22 times in my database one name may have appeared 3 times while others only once. This should be a pretty basic function but I haven't been able to crack the syntex. [sig][/sig]
 
I created this using Access Find Duplicates Query Wizard.
Code:
SELECT DISTINCTROW First(duplicate.field1) AS [field1 Field], Count(duplicate.field1) AS NumberOfDups
FROM duplicate
GROUP BY duplicate.field1
ORDER BY Count(duplicate.field1);
I just removed the part where it didn't display the records that weren't duplicated.

Hope this helps...
[sig]<p>Terry M. Hoey<br><a href=mailto:th3856@txmail.sbc.com>th3856@txmail.sbc.com</a><br><a href= > </a><br>Ever notice that by the time that you realize that you ran a truncate script on the wrong instance, it is too late to stop it?[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top