* Where there are dupes within a Quarterly <File Type> table * and the user has flagged one of the recs of a dupe set as a * non-error record, delete the other members of the dupe set. QIndexKey = key(tagno('CompSSNOEP'),'QorM') set filter to 'Dupe'$ErrFlag1+ErrFlag2.and.QorM->DeletFails count all to N if N>0 set fields to F1=&QIndexKey GoodDupes = new array(N,1) copy all to array GoodDupes set fields to set filter to 'Dupe'$ErrFlag1+ErrFlag2.and..not.QorM->DeletFails delete for GoodDupes.Scan( &QIndexKey ) > 0 endif set filter to