Full Version: finding dups
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
edojan
Hi Guys,

Having a brain fart cant figure this out this morning.

Here is table i Have:
CustomerID (unique PK)
VendorID
SaleDate

There are few million records, I need to find duplicate billings same Vendor ID and witing 2 Days of SaleDate. basically select all records that have unique custID, same VendorID and almost same SaqleDate (within 2 days).
how do i do this?

Thanks!
Ender
There is no command to do a group by on "almost the same sales date" with sql. However, it probably could be done with code. You would just create a basic select and then order by the 3 fields you give above, then you would process one record at a time and compare it to the previous record. You could then write out all potential duplicates to another table. Note: for a few million records this could take a bit. Anyone else have any other ideas?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.