I've created the following update query which joins to another table:
-- update new_ae.new_aeoffice with proper office name
update new_ae
set new_aeoffice = ado.OfficeName
from new_ae
join #AE_Domain_Office ado on new_ae.New_DomainName = ado.DomainName
The issue I'm having is that #AE_Domain_Office has 2 rows with a matching domain name so this update statement is only updating the first row with the expected office name. How can I adjust this query so additional matching rows in #AE_Domain will get updated?