How do I eliminate duplicate records

G

Guest

I want to eliminate duplicate entries in a table. The table has 22,136
records with each record having either 1 or up to 4 entries.

The records contain:
County Name: The names of the counties in the state California
CountyID: a numeric ID for each county (1 to 58)
FacilityID: A numeric value for each individual facility (1 to 13,902,148)
Company name:
Address, City, etc… along with other facility information

Each county starts numbering the facilities at 1. So we have approximately
58 facilities with the number 1 as a FacilityID (for 58 counties) 58
facilities with the number 2 and so forth.

How do I display only one FacilityID per county?

See sample below

County CountyID FacilityID Company
ALAMEDA 1 30 OWENS-BROCKWAY GLASS CONTAINER
ALAMEDA 1 30 OWENS-BROCKWAY GLASS CONTAINER
ALAMEDA 1 30 OWENS-BROCKWAY GLASS CONTAINER
ALAMEDA 1 30 OWENS-BROCKWAY GLASS CONTAINER
ALAMEDA 1 54 HEXCEL CORPORATION
ALAMEDA 1 54 HEXCEL CORPORATION
ALAMEDA 1 54 HEXCEL CORPORATION
ALAMEDA 1 54 HEXCEL CORPORATION
ALAMEDA 1 59 UNIVERSITY OF CALIFORNIA, BERK
ALAMEDA 1 59 UNIVERSITY OF CALIFORNIA, BERK
ALAMEDA 1 59 UNIVERSITY OF CALIFORNIA, BERK
ALAMEDA 1 59 UNIVERSITY OF CALIFORNIA, BERK
 
A

ACG

If you are trying to get rid of the duplicates completly
and stop them in the future what I would do as a one off
exercise is:-
Copy the and paste the structure only.
on the new table create a keyfield of County and Facility.
use an append query to append all of the data from the
current table to the new table.
rename the current table (as a backup - just in case)
rename the new table to the orignal table name.

This would remove any the duplicate County & Facility
combinations and stop them from happening again.
 

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