I am trying to update table Original with the values in Final. I’m new to SQL, but I have been at this for two hours trying to change various samples to fit my needs. I am using Access 2007.
UPDATE
Original o
SET
o.[Assest Description] = (
SELECT f.[Assest Description] FROM Original o, Final f
WHERE o.[Assest No] = f.[Assest No])
WHERE o.[Assest No] = Final.[Asset No]
I’m not sure your
selectstatement returns only one row. If you want to perform an update on a table using aselectstatement for assignment, you must be sure that it returns only one row.Besides that, you may consider the next solution:
Notice that this will only work correctly if both
[Assest no]is a unique key in bothOriginalandFinaltables, and they are properly related.