Documentation Home

Update Store Addresses (All modules)

-- Move store address to the address table
INSERT INTO BLC_ADDRESS (ADDRESS_ID, ADDRESS_LINE1, ADDRESS_LINE2, CITY, ISO_COUNTRY_SUB, POSTAL_CODE, ISO_COUNTRY_ALPHA2, PRIMARY_PHONE) SELECT -1 * (store.store_id + 100), store.address_1, store.address_2, store.store_city, store.store_state, store.store_zip, store.store_country, store.store_phone FROM BLC_STORE store;

-- Update stores to point to the new address
UPDATE BLC_STORE SET ADDRESS_ID = -1 * (store_id + 100);