Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 INNER JOINS return Syntax error 1

Status
Not open for further replies.

russland

Programmer
Jan 9, 2003
315
CH
Hi

If I run only the whole query with 1st INNER JOIN, only, it works fine. When I append the second INNER JOIN (see below) it would return an error: Syntax error(missing operator) in query expression 'A.ProjectID = P.ProjectID
INNER JOIN ConstructionStatuses ON P.ConstructionStatusID = ConstructionStatuses.ID'
Do I need a delimiter between the 2 JOINS? I'm using MsAccess.

My Query
-----------------
INNER JOIN Projects AS P ON A.ProjectID = P.ProjectID
INNER JOIN ConstructionStatuses ON P.ConstructionStatusID = ConstructionStatuses.ID

Any hints highly welcome

Cheers
 
MsAccess (in fact JetSQL) syntax:
FROM [!]([/!]yourTable AS A
INNER JOIN Projects AS P ON A.ProjectID = P.ProjectID[!])[/!]
INNER JOIN ConstructionStatuses ON P.ConstructionStatusID = ConstructionStatuses.ID

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
My query was so complex and stuffed with subqueries that I set the begining parantheses after the wrong FROM (since I saw that answer from you in another thread). I let the designer do it and he did it well - and as you suggested. thanks heaps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top