user32882 user32882 - 5 months ago 8
SQL Question

Syntax error in FROM clause for simple script

I am getting a "syntax error in FROM clause" in the following script:

SELECT
a.Field2 AS ID1,
b.Field2 AS ID2

FROM table1 AS a
JOIN table2 AS b
ON a.Field1 = b.Field2 ;


I'm not sure what is causing this. Any indicators?

Answer

MS Access requires :INNER JOIN`:

SELECT a.Field2 AS ID1, b.Field2 AS ID2
FROM table1 as a INNER JOIN
     table2 as b 
     ON a.Field1 = b.Field2 ;
Comments