UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> finding dups    
 
   
edojan
post Dec 11 2008, 12:56 PM
Post #1

UtterAccess Addict
Posts: 222



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!
Go to the top of the page
 
+
Ender
post Dec 11 2008, 01:09 PM
Post #2

UtterAccess VIP
Posts: 1,283
From: AZ



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?
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 25th May 2013 - 09:22 PM