Deleting Duplicate Values in a Query

  • Thread starter Thread starter skennd
  • Start date Start date
S

skennd

Here's my problem in exact replication:

I have used the find duplicate query in Access, and the query
determined the following duplicate values by the following query:

In (SELECT [DocNo] FROM [File Name] As Tmp GROUP BY [DocNo] HAVING
Count(*)>1 )

DocNo Amounts
ABC 12
ABC 123
BDC 10
BDC 1000

Now I want to go further by saying if the DocNo is duplicate as shown
in the query above then to delete the least of the two amounts
associated with it.

Note: the Amounts are in a separate column and can be filtered in
ascending order or the lesser of the two amounts comes first.

Please help if you know a better query that can delete the duplicate
DocNo and the lesser of the two amounts that are associated with it.

I appreciate any help you can offfer on this topic.
 
skennd said:
Here's my problem in exact replication:

This has nothing to do with security, you may get better responses by
posting in comp.databases.ms-access.

Keith.
 
Back
Top