PDA

View Full Version : Table De-Duplicator



mattster1010
03-16-2010, 03:15 AM
Morning,

I have a table that I need to de-duplicate. I need a de-duplicator that will look at the first two fields in a table, Employee No and week ending date. I would like the de-duplicator to check against the previous record to see if these two values are the same as the current record.

Does anyone have any idea's how I may approach this?

Regards,

Matt

OBP
03-17-2010, 04:04 AM
You can do that with a VBA recordset, or you can actually do it using a Delete Query.
If you create a new Field and set it's property to Indexed - No Duplicates.
Create an Update query that updates that field to Employee No & week ending date, i.e. Combine the 2 fields in to one, it will only update the first Instance of that combination.
That will leave the Duplicates with nothing in the new field, you can then run a Delete query that deletes records where the new field Is Null.