Year()
is a function which returns a variant subtype integer which corresponds to the calendar year of the date value you give to the function.
In your case, it seems you have a field named Year
. So perhaps the "missing parameter" is the expected date argument to the Year()
function.
You can avoid confusing the db engine by enclosing Year
in square brackets. The brackets signal the engine that Year
is an object (field) name instead of the function.
update [Original Table] as a inner join Updates as b on a.ID = b.ID
set a.[Variable 1] = b.[Variable 1]
where [Year] = "2000";
Whenever possible, it's better to use names which don't conflict with reserved words. That may not be practical in your situation ... but if you can do it you will reduce the number of Access development headaches you will suffer. :-)
For further information about "naming challenges", see Problem names and reserved words in Access.
Sorry I overlooked the point that the query can work in spite of that WHERE clause issue.
I can't see anything about the remainder of your SQL which should trigger a complaint from the db engine. I assume you tested that statement directly in Access, and got no errors.
If there is something peculiar to the interaction between SAS and Access which causes this, perhaps you could use a saved Access query as a work-around. Take that SQL and save it as a named query, qrySasTest
, in your Access db. Then try executing qrySasTest
from the SAS side.