how to update table using select query in sql server