2 code formatting
source | link

Here's an alternative formulation of Jon's query that might work better for you: UPDATE civicrm_address ca SET location_type_id = 3 WHERE location_type_id = 2 AND ca.contact_id in (SELECT id from civicrm_contact where contact_type = 'Organization');UPDATE civicrm_address ca SET location_type_id = 3 WHERE location_type_id = 2 AND ca.contact_id in (SELECT id from civicrm_contact where contact_type = 'Organization');

Here's an alternative formulation of Jon's query that might work: UPDATE civicrm_address ca SET location_type_id = 3 WHERE location_type_id = 2 AND ca.contact_id in (SELECT id from civicrm_contact where contact_type = 'Organization');

Here's an alternative formulation of Jon's query that might work better for you: UPDATE civicrm_address ca SET location_type_id = 3 WHERE location_type_id = 2 AND ca.contact_id in (SELECT id from civicrm_contact where contact_type = 'Organization');

1
source | link

Here's an alternative formulation of Jon's query that might work: UPDATE civicrm_address ca SET location_type_id = 3 WHERE location_type_id = 2 AND ca.contact_id in (SELECT id from civicrm_contact where contact_type = 'Organization');