de-duping a file
Richard Hane
yoresoft at sbcglobal.net
Fri Mar 22 10:10:40 PDT 2013
Scott,
This should be rather simple to do. I have processes that run weekly to some files to do the same thing since fp does not have a pack feature.
Copy to database [db1] in question to a new db [db2] using fpcopy. You do not want to copy data and don't need the reports forms, etc.
Create a process to (1) see if the acount aleady exists in the new db
(2a) if not copy the full data to the new db.
(2b) if it exists check the date to see if the record is newer then copy & replace data or if not skip it and do not copy.
(3) when done you should have a 'clean' database in db2.
(4) you can then erase db1 and copy db2 back or rename it, your choice.
IMPORTANT: Always back a copy / backup before any mass changing or deleting.
Hope this helps,
Rick Hane
Controller
Deluxe Stitcher Company Inc
________________________________
From: "scooter6 at gmail.com" <scooter6 at gmail.com>
To: filepro-list at lists.celestial.com
Sent: Friday, March 22, 2013 11:56 AM
Subject: de-duping a file
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
i.e.
Account Number is 1234-5678
There are 3 records in file with '1234-5678' as 'Account Number'
One dated 01/12/13
One dated 02/01/13
One dated 03/18/13
I want it to delete both records dated 01/12/13 & 02/01/13 but keep the one
from 03/18/13
Not quite sure how to go about doing this quickly....
thanks
Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20130322/04ebe527/attachment.html
_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
Subscribe/Unsubscribe/Subscription Changes
http://mailman.celestial.com/mailman/listinfo/filepro-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20130322/c89c15b9/attachment.html
More information about the Filepro-list
mailing list