Skip to content
Advertisement

Is there any issue to run multi join in access db

I am trying to run this sql statement in access and found Syntax error

Select  * 
from TableC C INNER JOIN TableE E 
on E.TKey = C.TKey
INNER JOIN TableP P on P.TKey = E.TKey  AND E.employee_id = '123' 

Error:

syntax error(missing operator) in query expression 'E.TKey = C.TKey
    INNER JOIN TableP P on P.TKey = E.TKe'

Advertisement

Answer

In access you cannot have multiple joins without separating them with parentheses.

Select  * 
from (TableC C 
INNER JOIN TableE E 
on E.TKey = C.TKey)
INNER JOIN TableP P 
on P.TKey = E.TKey  
AND E.employee_id = '123'; 
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement