update query with self join in sql server