0

I am trying to type a SQL query in MS Access to update the records in FilesTable.FilePath with the records in Files.FPath, when the FilesTable.FileName Matches a record in Files.FName, but I receive an error:

UPDATE FilesTable
SET FilesTable.[FilePath] = Files.[FPath]
FROM (FilesTable INNER JOIN Files ON (FilesTable.[FileName] = Files.[FName])
WHERE *;

syntax error (missing operator) in query expression 'Files.[FPath] FROM (FilesTable INNER JOIN Files ON (FilesTable.[FileName] = Files.[FName]) WHERE *;'

I have also tried to add () after Set as well which results in an error as well:

UPDATE FilesTable
SET (FilesTable.[FilePath] = Files.[FPath])
FROM (FilesTable INNER JOIN Files ON (FilesTable.[FileName] = Files.[FName])
WHERE *;

Syntax Error in UPDATE Statement.

Here is how my tables looks like

1 Answer 1

0

This is the correct query:

UPDATE FilesTable
INNER JOIN Files ON (FilesTable.FileName = Files.FName)
SET FilesTable.FilePath = Files.FPath
Sign up to request clarification or add additional context in comments.

2 Comments

I get "Syntax Error in UPDATE Statement." again
lol i just did that and came here to say this is what i did, thanks man

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.