I'm trying to run this SQL Expression in Access:
Select *
From ((TableA
Left Join TableB
On TableB.FK = TableA.PK)
Left Join TableC
On TableC.FK = TableB.PK)
Left Join (SELECT a,b,c FROM TableD WHERE b > 1) AS TableD
On (TableD.FK = TableC.PK AND TableA.a = TableD.a)
but it keeps getting error: Join-Expression not supported. Whats the problem? Sorry, im just starting with Jet-SQL and in T-SQL its all fine. Thanks
The issue is that the final outer join condition
TableA.a = TableD.awill cause the query to contain ambiguous outer joins, since the records to whichTableAis joined toTableDwill depend upon the results of the joins betweenTableA->TableB,TableB->TableCandTableC->TableD.To avoid this, you'll likely need to structure your query with the joins between tables
TableA,TableB&TableCexisting within a subquery, the result of which is then outer joined toTableD. This unambiguously defines the order in which the joins are evaluated.For example: