sql server update from select distinct