UPDATE ship_to SET tax_group_id = address.phys_postal_code FROM ship_to JOIN address ON ship_to_id = address.id JOIN tax_group_hdr ON address.phys_postal_code = tax_group_hdr.tax_group_id