I am trying to join three tables in MS Access 2010 in a SQL query.
SELECT Track.trackName, TrackIsGenre.genre, ContainsTracks.albums
FROM Track
INNER JOIN TrackIsGenre ON Track.trackName = TrackIsGenre.track
INNER JOIN ConstainsTracks ON Track.trackName = ContainsTracks.tracks
WHERE genre = "Rock"
ORDER BY trackName ASC;
I searched the net and as far as I can see this should be it. I can JOIN two tables no problem. The error I get is: "Syntax error (missing operator) in query expression" and it highlights the two INNER JOIN.
Any help would be greatly appreciated.
Add a parenthesis on you first join, (this is optional on MOST RDBMS)
SELECT Track.trackName, TrackIsGenre.genre, ContainsTracks.albums
FROM (Track INNER JOIN TrackIsGenre ON Track.trackName = TrackIsGenre.track)
INNER JOIN ConstainsTracks ON Track.trackName = ContainsTracks.tracks
WHERE genre = "Rock"
ORDER BY trackName ASC;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With