Dupes in a table

  • Thread starter Thread starter JT
  • Start date Start date
J

JT

I have query with 2 tables. When I run a query against
just Table 1, I get 708 items.

When I join Table 1 with Table 2 (product number) and run
the same query, I get 710 items.

The reason is two product numbers are duplicated in Table
2.

The problem is I do not have the ability to remove the
dupes from Table 2.

I'm looking for suggestions on removing the dupes from
Table 2 with either a query, make table query, macro,
etc....Thanks
 
Hi,


SELECT f1, f2, LAST(f3), LAST(f4)
FROM myTable
GROUP BY f1, f2


would remove any duplicated (f1, f2). You are not obliged to use two
fields, just one, or three, etc. The idea is to use LAST on all the fields
that are not in the GROUP BY.


Use that query rather than the original table.


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top