I am new to some of the SQL syntax required by Access
I am having trouble joining a table on two field criterias eg:
Access will not allow this syntax and I can only think to put the 2nd criteria in the WHERE clause like so:
This method appears to be removing some of the original lines from table A based on the B.ProductsID = A.ProductsID.
Surely this defeats the purpose of a left join??
Any help would be most appreciated
I am having trouble joining a table on two field criterias eg:
Code:
Select *
From TableA A
Left Join TableB B ON (B.CustomersID = A.CustomersID AND B.ProductsID = A.ProductsID)
Access will not allow this syntax and I can only think to put the 2nd criteria in the WHERE clause like so:
Code:
Select *
From TableA A
Left Join TableB B ON (B.CustomersID = A.CustomersID)
WHERE B.ProductsID = A.ProductsID OR B.ProductsID IS NULL
This method appears to be removing some of the original lines from table A based on the B.ProductsID = A.ProductsID.
Surely this defeats the purpose of a left join??
Any help would be most appreciated