How do I eliminate duplicate entries in a query

R

Rick Sky Mind

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
 
M

Mike Painter

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.
 
L

Larry Daugherty

Use the query that you used to give us the sample, insert "Top 1" without
the quotes.

Look in help for Top

HTH
 

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