I have an existing duplicate query that compares two columns that are identical, PhoneNumber and EmailAddress. The query also displays the Primary Key, an autonumber field called AutoNum.
I have 10,316 results so I'd like to use an SQL statement to automatically remove these entries. Of course, this query contains entries I'd would like to keep. I'd like to specify to compare the AutoNum field to the duplicates (keep the smallest field, remove the remainder).
I can perform the SQL delete query myself, I'm just having difficulty specifying to ignore the smallest AutoNum field.
Here's an example:
In this example: 101, 105, 120, 25, and 130 would be deleted. 1, 5, and 10 would remain.
I have 10,316 results so I'd like to use an SQL statement to automatically remove these entries. Of course, this query contains entries I'd would like to keep. I'd like to specify to compare the AutoNum field to the duplicates (keep the smallest field, remove the remainder).
I can perform the SQL delete query myself, I'm just having difficulty specifying to ignore the smallest AutoNum field.
Here's an example:
AutoNum PhoneNumber EmailAddress
1 555-9999 bobsmith@isp.com
101 555-9999 bobsmith@isp.com
5 123-4567 george@isp.com
105 123-4567 george@isp.com
120 123-4567 george@isp.com
10 555-8888 smilingbob@isp.com
25 555-8888 smilingbob@isp.com
130 555-8888 smilingbob@isp.com
In this example: 101, 105, 120, 25, and 130 would be deleted. 1, 5, and 10 would remain.