The Delete Duplicates tool deletes duplicate records from a table while retaining map objects. This tool does not change the original table in any way. Keep in mind that MapInfo Pro has a 255 byte/ 5-column limit for a Group by clause, so you may have to change the size of your columns if they are unusually wide.
When we say duplicate rows, we mean rows that have duplicate occurrences of the same column value for the column you select.
For information about how to add a tool to the Tool Manager, see Working with MapInfo Pro Tools.
Removing Duplicate Records from a Table
Before you open the Delete Duplicates tool in MapInfo Pro, make sure the tables you want to work with are open.
To remove duplicate records from a table and save the cleaned table to a new file:
- Open the table or tables you want to delete duplicates from.
- On the HOME tab, in the Tools group, click Tool Extensions, and double-click Delete Duplicates on the Running tab.
The Delete Duplicate Records dialog box opens. The list of tables on the left contains all of the currently open tables.
- Select the table you want to delete duplicates from in the first column. A list of the columns in that table displays on the right.
- Select the column that contains information that should be unique to each row from the Select Columns list.
CAUTION:To avoid deleting data incorrectly, give this step a lot of thought. For example, we do not recommend you select customer names or addresses for this step.
- Select the Count check box to add a column to your new table that shows the number of instances of the column value found in the original table. This is an optional feature.
- Click OK. The Please Choose a Path dialog box displays.
- Select a path and a file name for the new table in this dialog box. Then select Save. The tool removes rows containing duplicate column values according to the column you selected. A Browser window displays with the results of the new table.
The last column contains the count of instances of the row containing duplicate column values in the original table.