I have two tables, tableA and tableB, linked through a locationID.
TableA has descriptive survey info with each record from a different time (ie unique), while TableB has purely locational information. However, there are lots of duplicates in TableB, yet each has a unique locationID, which has an entry in TableA. I’ve found plenty posts about removing duplicates from TableB, but how can I update the locationIDs in TableA so they are linked to the unique locations in TableB once duplicates are removed…
Help much appreciated!
First of all you have to update TableA before removing the duplicates in TableB. If not, you are gonna lose information.
After that, make all the duplicates in table B equal in one field (let’s say LocationDescription)
Then, select one LocationID of all them. Let´s say the MIN Location ID.
After that, update tableA with that MinID and then remove from TableB the duplicates in a really easy way (with a NOT in).
Here´s an example:
Asumming
After this you get this: