Duplicates

  • Thread starter Thread starter Allison
  • Start date Start date
A

Allison

I have a field in a make table query that has duplicate
numbers. What criteria should I use to get rid of any
duplicates?

Thanks,
 
Dear Allison:

Without knowing about the details, here's a bit of a sketch.

If you have two rows that have the same value in one particular
column, you could choose to add one of them to the table and exclude
the other one. But, assuming there are other columns in the table,
and assuming that some of the other columns in the source query for
the make table, the final product will be different depending on which
of the two rows is added.

Database software, especially query engines, are not built to handle
ambiguity like this. You would have to use some criteria that specify
which of the two different rows are to be added.

If, on the other hand, it is the case that whenever you have this
one-column duplicate, all the other columns are identical as well,
then you could simply make the SELECT query portion DISTINCT,
eliminating duplication altogether.

But, no matter how you try, you cannot leave the arbitration between
the two alternative rows to add to the query. You have to specify
this yourself.

I suggest you work with a select query to iron out what you want, and
then change that into the make table query afterward.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Guys,

I have one field with duplicates

Field name - APPL ID

the numbers appear
APPL ID Total Award
6294701 1,500
6294701 1,500
6293862 2,500
6293862 2,500
6294789 3,333

Because the APPL ID is duplicated the dollar amount
column shows duplication and my total dollars appear
overstated due to the duplication of the APPL ID. Is there
a way in my query to remove this at the critiera level? Or
can you provide a formula to remove the duplicate APPL
ID's.
 
Dear Allison:

I'm not sure I understand from where they came, but I can get rid of
them. In the SQL view of the query, after the SELECT add the word
DISTINCT.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Back
Top