AND/OR criteria in a JOIN
The following SQL statement works in SQL Server 2005. I need to use it in Access 2000 but can't get it working. I used the Query Designer in Access to get the basic tables joined, and then tried adding the AND parts to the SQL View, but get various messages depending where the () are; sometimes I get "JOIN not supported", other times it says it can't represent the query in design view and when I try running it, nothing happens; no errors, no results. It just doesn't do anything.
Does Access support AND/OR criteria in the JOIN/ON clause?
SELECT (columns)
FROM P
INNER JOIN A
ON A.col1 = P.col1
INNER JOIN AI
ON AI.col2 = A.col2
AND AI.col3 = 1
LEFT JOIN LP
ON LP.col4 = A.col4
AND LP.col4 = P.col4
AND LP.col5 = 'text'
|