Top Navigational Bar

Merge - Advanced Codes Used To Delete Duplica
DocumentID: 651689
Revision Date: 29-Feb-96 8:29:09 PM

The information in this document applies to:
WordPerfect® 5.1 for DOS

Problem

Solutions: The {VARIABLE} command can be used to delete duplicate records in a secondary file. The commands below can be used in a primary file which can be merged with a secondary file containing the possible duplicate records. This merge eliminates any duplicate records and creates a new secondary file. Before starting the merge, the secondary file must be sorted so the duplicate records are next to each other.

{LABEL}Top~{ASSIGN}1~{FIELD}1~~{FIELD}1~{MRG CMND}{END FIELD}
{MRG CMND}{FIELD}2~{MRG CMND}{END FIELD}
{MRG CMND}{FIELD}3~{MRG CMND}{END FIELD}
{END RECORD}
[HPg]
{MRG CMND}{NEXT RECORD}{COMMENT}
{LABEL}Start~{COMMENT}~
{ASSIGN}2~{FIELD}1~~{IF}"{VARIABLE}1~"="{VARIABLE}2~"~{COMMENT}~
{NEXT RECORD}{GO}start~{ELSE}{GO}Top~{END IF}

The merge will only work properly if the secondary file contains EXACTLY three fields. If not, the merge codes must be modified. Also, the merge will only delete those records where the first field of two adjacent records are EXACTLY the same.

Answer:

Details:


Product specifications, packaging, technical support and information (*Specifications*) refer to theUnited States retail English version only. Specifications for other versions may vary. All Specifications, claims, features, representations, and/or comparisons provided are correct to the best of our knowledge of the date of publication, but are subject to change without notice.OUR MAXIMUM AGGREGATE LIABILITY TO YOU AND THAT OF OUR DEALERS AND SUPPLIERS IS LIMITED. IT SHALL NOTEXCEED THE AMOUNT YOU PAID TO ACCESS THE INFORMATION. SEE LEGAL DISCLAIMER.