1

I'm trying to update a microsoft access database table field from a similar field in a linked table.

Here are my table names:

Raw data
sectionroster

And here's my query so far:

UPDATE [raw data].[current supervisor]
FROM [raw data] 
INNER JOIN [sectionroster] ON [raw data].[associate id]=[sectionroster].[employee number]
SET [raw data].[Current Supervisor] = [sectionroster].[supervisor];

It's giving me a syntax error referencing the from clause, and I can't figure out why. Any help would be appreciated!

1 Answer 1

0

Try this

UPDATE [raw data].[current supervisor]
SET [raw data].[Current Supervisor] = [sectionroster].[supervisor]
FROM [raw data] 
INNER JOIN [sectionroster] ON [raw data].[associate id]=[sectionroster].[employee number]
Sign up to request clarification or add additional context in comments.

7 Comments

No problem. Did it work? If so, please accept the answer so that it helps the others.
Thanks for the fast response! However, its giving me the exact same error! Is it possible that I some how have the relationship wrong between the 2 tables? I have [raw data].[associate id] directly linked to [sectionroster].[employee number]. and this is the only relationship existing on either table. Thanks again! JD
The query looks about right. I found another question on stack overflow. May be this could help you solve the problem. stackoverflow.com/questions/537161/…
Thanks again, Vinay! I just figured it out!
This is what worked for me! UPDATE [raw data] inner join [sectionroster] ON [raw data].[associate id]=[sectionroster].[employee number] SET [raw data].[Current Supervisor] = [sectionroster].[supervisor] ;
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.