Can't Inner join with 3 tables?

TexasP

New member
Joined
Jul 14, 2007
Messages
4
Programming Experience
1-3
Hi,

Im using MS access 2003 as my database

I have 3 tables

Table 1 name is Product with ProductID, ProductTitle
Table 2 name is departmentProduct with ProductID , DepartmentID
Table 3 name is Department, with DepartmentID, DeptName

i wanna get productTitle based on DepartmentName

my query is

Select ProductTitle
from Product a inner join departmentProduct b
on a.ProductID = b.productID
inner join department c
on b.departmentId = c.departmentID

it doesn't work giving me error Syntax operator
 
Access is a bit crap in this regard. Try this:

Select ProductTitle from
(Product a inner join departmentProduct b on a.ProductID = b.productID)
inner join department c on b.departmentId = c.departmentID


every time you want to inner join, wrap what you already have in brackets:

Select * FROM
((((a join b) join c) join d) join e)
 
Back
Top