How do I eliminate duplicate entries in a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to eliminate duplicate entries in a query. 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
 
Create a duplicate table copying only the structure (cut and paste is the
easy way)
Make the field containing the duplicate a key field in the blank table.
Do an append to the blank table.
 
Use the query that you used to give us the sample, insert "Top 1" without
the quotes.

Look in help for Top

HTH
 
Back
Top