update c
set c.SelectedUnitId=v.UnitGuid
from CmsUserTbl c
	join VendorTbl v on v.VendorId=c.VendorId
where c.SelectedUnitId is null