I am using SQL Server 2008, R2. Have a master table (table A) and try to update it with the values ββfrom the temp table (Table B).
SQL Server throws an error stating that the subquery returns more than one value, however, I donβt see how this is possible, since the value returned by the subquery is the primary key of table B.
Here's the request:
UPDATE TableA
SET TableA.field = (SELECT TableB.field
FROM TableA
INNER JOIN TableB ON TableA.key = TableB.key)
Any help is greatly appreciated, as usual!
source
share