Support 805.461.7300
Sales
Our Technology. Your Success.

Combine multiple records into one record that have the same last name at the same address

Example Input:
John Smith 100 Main St
Jane Smith 100 Main St
Kevin Smith 100 Main St
Result you will see in the field named FIRST:
The Smith Family

INSTRUCTIONS
Make sure the name information is separated into the First and Last fields. if not you can Parse the name information from the Special>Parse> Name option.
Run the duplicate search from the Select>Show Duplicates option, with Household selected in the general tab as the search criteria.
IMPORTANT: Make sure to select the "Backup Duplicates option" at the bottom of the screen.
Update the database with the duplicate results.
Run the following command from the Command window (Edit>Command) You can copy/paste the following command into the Command statement Syntax area of the command window and click RUN.

ON ERROR com_message=message() 
PUBLIC cDupFilePath,comAlias,comUnique 
PUBLIC ARRAY comArFiles(1,1) 
SET SAFETY OFF 
* Get the current Databases Alias Name 
comAlias=ALIAS() 
* Capture all back file names in memory 
=ADIR(comArFiles,ADDBS(JUSTPATH(DBF(comAlias)))+"*.rpt") 
* Create the variable name for the duplicate records 
cDupFilePath=ADDBS(JUSTPATH(DBF(comAlias)))+FORCEEXT(comArFiles(1,1),'dbf') 
comUnique=SYS(2015) 
USE (cDupFilePath) IN 0 ALIAS (comUnique) 
SELECT(comUnique) 
INDEX ON therec_xx tag therec_xx 
SELECT(comAlias) 
ALTER TABLE (comAlias) ADD COLUMN priority C(1) 
ALTER TABLE (comAlias) ADD COLUMN name2 C(60) 
replace name2 with first for "1"$(priority)
replace all priority with "" 
REPLACE priority WITH IIF(!DELETED(),'1','2') for SEEK(RECNO(),comUnique) 
RECALL ALL 
replace first with "The "+allt(last)+" Family", last with "" for "1"$(priority)
delete for "2"$(priority)
pack
USE IN IIF(USED(comUnique),SELECT(comUnique),0) 
RENAME (FORCEEXT(cDupFilePath,"rpt")) ; 
   TO (cDupFilePath+".txt")

« Back to Commands

I have been working in pretty much all areas of senior-level IT and Data Processing for many years and have had countless hours of experience engaging with customer support. I’ve never had better support than what I receive from Accuzip! Seriously, any time I call, email, or go to the online chat, someone responds in less than a minute, is always very patient and pleasant, and resolves my issue quickly. Aside from just fixing the problem, your support team always takes the time to explain what the problem was and how to prevent it. It is very refreshing and encouraging to see that real support still exists. Thanks to the Accuzip Team!  I look forward to many more years of engagement with your Team.
M.M., Scottsdale, AZ