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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicate Records

Status
Not open for further replies.

goslincm

MIS
May 23, 2006
292
US
I am working with a table that has three fields which make up a unique record. These fields are being imported into Access from a Paradox program (where they are listed as individual fields, and none designated as primary keys.

CountyCode LocalUnitType LocalUnitCode

County codes range from number 1-95 to represent the various counties in the State. Local Unit Types have code between 1-3 representing cities, villages and townships, then local unit code is merely a three digit number to distinquish between the same county with several townships.

What I need to find a way to do is to compare records within this table to look for duplicates.

I do not know how to approach this??
 
Something like this ?
SELECT CountyCode, LocalUnitType, LocalUnitCode
FROM yourTable
GROUP BY CountyCode, LocalUnitType, LocalUnitCode
HAVING COUNT(*) > 1

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top