cancel
Showing results for 
Search instead for 
Did you mean: 

Fix duplicate entries in customer tables

Fix duplicate entries in customer tables

Having a bit of a nightmare trying to fix a messed up a mg_customer_address_entity_varchar table.

When I exported customers with dataflow from an old store to a new one, I didn't realize that somehow two columns (Shipping Company and Billing Company) had been duplicated several times across multiple customers, seemingly at random.

So now when existing customers places a new order, the are often seeing a wrong company name in their address.

Unfortunately I have no way of knowing which company name actually belongs to which customer.

The only thing I can think of doing is to completely remove all Shipping Company and Billing Company entries from the database.

I am not very good with phpMyadmin and I'm worried about going and truncating tables or manually deleting entries, especially in bulk, as I might render the whole mg_customer_address_entity_varchar table useless.

Can anyone suggest a safe way to remove Shipping Company and Billing Company entries without causing any unwanted behaviour? It has to be done in bulk in the database as there are literally hundreds of such duplicate entries.

Many thanks for any help.