Reputation: 3050
I am trying to join two two tables in MS ACCESS2010 query but it gives an error Here is the query
SELECT f.FileName, f.CreationDate, fs.SheetName, fs.SheetNo, SB.Tags
FROM Files AS f LEFT JOIN FilesSheets AS fs
ON f.FileId = fs.FileId
LEFT JOIN SubmitSheets AS SB
ON f.FileId =SB.FileId
WHERE f.FileId = 'Machine_Inspection_20140820183554.xlsx'
Here is the error
Upvotes: 0
Views: 49
Reputation: 1325
Access Needs Parenthesis around joins to group them. Try this:
SELECT f.FileName, f.CreationDate, fs.SheetName, fs.SheetNo, SB.Tags
FROM (Files f
LEFT JOIN FilesSheets fs
ON f.FileId = fs.FileId)
LEFT JOIN SubmitSheets SB
ON f.FileId = SB.FileId
WHERE f.FileId = 'Machine_Inspection_20140820183554.xlsx'
Upvotes: 3