I have a blank field in one table that I want to update based on information in another table. The tables are related and the subquery in my SET = clause returns the right information, but I get the error that my subquery cannot return more than one value.
How can I relate the list of returned values to the original table so I can update it?
TIA
How can I relate the list of returned values to the original table so I can update it?
Code:
UPDATE TABLE1
SET LASID = (SELECT TABLE2.STD_NUMBER
FROM TABLE2 JOIN TABLE3
ON TABLE2.ID = TABLE3.ID
JOIN TABLE1
ON TABLE1.ID = TABLE3.ID)