I'm feeling the Christmas spirit here:
For MySQL:
Code:
update contacts c
inner join accounts_contacts ac on c.id = ac.contact_id and ac.deleted = 0
inner join accounts a on ac.account_id = a.id and a.deleted = 0
set c.primary_address_street = a.billing_address_street
,c.primary_address_city = a.billing_address_city
,c.primary_address_state = a.billing_address_state
,c.primary_address_postalcode = a.billing_address_postalcode
,c.primary_address_country = a.billing_address_country
where c.deleted = 0
Update as needed.
Bookmarks