Creating a delete query to delete duplicate records in MS-Access
Posted on 2013-01-16
I would like to create a query which will delete duplicate records in a table, i.e., those records having the same First Name, Last Name and Middle Name but having an earlier entry date/time.
For example, if have the following records in a table:
First Name Last Name Middle Name Email Entry Date
1 John Smith Peter firstname.lastname@example.org 01/08/2013 11:15:36 AM
2. John Smith Peter email@example.com 01/06/2013 12:40:03 PM
3. Jane Doe Mary firstname.lastname@example.org 12/10/2013 10:20:00 AM
4. Jane Doe Mary email@example.com 12/10/2013 03:21:12 PM
5. John Smith Peter firstname.lastname@example.org 01/05/2013 05:22:14 PM
The query will delete Records 2, 3 and 5 will be deleted. How could I write such a query in Access using Query Design window and how would the SQL look like?