Excluding duplicate records in query

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

Guest

I have a table with about 300,000 records. Many are duplicates. I'm trying to
create a make-table query to get only 1 copy of each record while ignoring
the duplicate records.
Does anyone know how I can do this?

For example I have one column in the table that has phone numbers, is there
a wayt o only get the first record that has the phone number while ignoring
all the other records that have the same phone number?
 
I think that would only eliminate duplicates where all the fields were
equal.

Perhaps,

Group By the phone number and use FIRST on all the other fields. That won't
necessarily get the first record that has the phone number, but it will get
on of the records.

Another method is to build the table structure and set a unique index on the
phone number. Then do an insert into the built table. You will get an
error saying that ## records could not be added due to conflict in the
index. However, the query will insert one record with each phone number.
 
Back
Top