Sometimes you have multiple records where the same data spans across multiple columns in the table and you’d like to clean up that mess by leaving only one copy per unique set of records.
Let’s consider the following recordset:
Now we want to clean it up to have the result as following:
This is quite simple.
Firstly we will create a table containing only the records we want to create the pristine
This is our table that contains the clean record set.
Now, if you have unique ID field in the original table you can remove the unwanted records with the following query:
Otherwise, if you don’t have the ID field, you can just truncate the original table and insert the records from the clean table with:
Hope that helps somebody :-)