eliminate duplicate records in query

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?

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
 
D

DL

Not an answer, but if you have a single table containing the fields as given
you are duplicating data - a bad idea.
Perhaps a Table for Counties - Fields; Name and ID
Table Facalties - Fields; ID + address etc
The third Table Companies - Fields; Company, CountyID,FacilitiesID

The tables are linked in a relationship, the Companies table using lookups
to the other tables.
Though my idea is only a hint as I'm not entirely sure what the
fields/purpose is.
You may be able to use Tools/Analize/Table to split the db, however before
doing so insure you have a backup copy.
 

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