I have a query like this:
UPDATE t3
SET somevalue = (SELECT t2.id
FROM table1 t1
JOIN table2 t2
ON t1.fk_table2_id = t2.id
WHERE t3.id = t1.fk_table3_id)
FROM table3 t3
The subquery SELECT t2.id FROM table1 t1 JOIN table2 t2 ... returns 2+ values at some place in my SQL Server 20008 DB. Is there an easy way to figure out where it fails? Or is there another way to update a column in one table with values from another?
Thanks in advance