de-duping a file

Kenneth Brody kenbrody at spamcop.net
Fri Mar 22 12:04:48 PDT 2013


On 3/22/2013 12:56 PM, scooter6 at gmail.com wrote:
> I have a rather large file that may or maynot have multiple records based
> on our 'Account Number'  - there is also a 'date' field in this file
>
> I'm trying to de-dup the file - that is, if there are more than 1 record
> for 'each' account number, it should only keep the most current record.
> If there is only one record for said 'Account Number' it should keep it and
> do nothing - if there are multiple (2 or more) records for 'Account Number'
> it should keep the most current dated one
[...]

Well, after making a backup of the file...

Run a report, sorted by account number, plus date in descending order.  In 
output processing, if the account number is the same as the previous account 
number, then this account number has duplicates.  And, since you're going in 
reverse date order, you know that the record you're on is the "duplicate". 
Delete it.

-- 
Kenneth Brody


More information about the Filepro-list mailing list