Just trying to get my SQL query to work in MS-Access but it doesn't want to. I tried to find a guide or something about this, because I know it happens a lot of time and it's often just about adding some parenthesis, but I haven't been able to get this query working despite all my tries:
SELECT t1.Name AS lev1, t2.Name as lev2, t3.Name as lev3, t4.Name as lev4
FROM Folder AS t1
LEFT JOIN Folder AS t2 ON t2.Parent = t1.ObjId
LEFT JOIN Folder AS t3 ON t3.Parent = t2.ObjId
LEFT JOIN Folder AS t4 ON t4.Parent = t3.ObjId
WHERE t1.ObjId = '123456789';
Syntax Error - No operatorand then it points out to t2.Name on first line. Not sure why you ask me this. As you probably already know, Access needs a lot of parenthesis and that's why it's a syntax error, but I don't know where to put the parenthesis. I never exactly understood the difference and that's why I'm asking for some kind of guidelines or indications about the differences.