Suppliers-Remove Duplicates
<< Click to Display Table of Contents >> Navigation: PrimeCut Home Screen > Suppliers Mode > Suppliers-Remove Duplicates |
Before release 131 of PrimeCut, the suppliers table in the database did not have a "unique" index on supplier names. This meant that duplicate supplier names could be added, especially if a supplier had been previously marked as deleted, then re-added.
The Remove Duplicates button will only be visible if there is no unique index on supplier name (if there is, there can be no duplicates).
Pressing the Remove Duplicates button performs several steps:
1.Suppliers are grouped by their name, using a case-insensitive match. Singleton groups, those containing a single supplier, are ignored.
2.Groups containing multiple "duplicate" suppliers are examined, and within each set of duplicates the most recent, not-deleted supplier in the group is taken to be the best (the master). If all are deleted, it will just take the most recent deleted.
3.All plates referencing the duplicate suppliers within a group are redirected to the master supplier of the group.
4.The duplicate suppliers are permanently deleted from the database
5.The uppercase index on tblSupplier.name (CDXSUPPLIER_NAME) is dropped and recreated as Unique to prevent duplicates being created in future.