"join expression not supported" in Access

Mandeep Singh picture Mandeep Singh · May 17, 2013 · Viewed 29.9k times · Source

I am writing a SQL query with inner join as this

select * from (table1 inner join table2 on table1.city = table2.code)
   inner join table3 on table3.col1 = 5 and table3.col2 = 'Hello'

This giving me the error "Join expression not supported".

However, if I change the query like this then there is no error

select * from (table1 inner join table2 on table1.city = table2.code)
   inner join table3 on table3.col1 = [SomeColumn] and table3.col2 = [SomeColumn]

Why is Access giving me an error on the first query?

Answer

uaise picture uaise · May 13, 2014

Very late but I had a similar problem with JOIN expressions on MS Access, like described here Access sometimes needs everything inside the ON part of the query to be inside parenthesis, ie:

SELECT ... JOIN <table> ON (everything here inside the parenthesis) WHERE ...