Multiple left joins

arage

Registered User.
Local time
Today, 03:30
Joined
Dec 30, 2000
Messages
537
I can design a query where 5 left joins from one query to another will work but won’t let me look at the SQL because of “ambiguous outer joins”.

I was trying to recreate this in code unsuccessfully so far, but is it possible? Please advise.

I was typing something along these lines that tells me there is a missing operator in the syntax.
SELECT Query5.promotionType, Query5.DirectorCode, Query5.Code, Query5.Year, Query5.Month, Query5.ManagerName
FROM Query5 LEFT JOIN NewQuery ON (Query5.Month = NewQuery.tempMonth) LEFT JOIN Query5.promotionType=NewQuery.PromotionType (LEFT JOIN Query5.DirectorCode=NewQuery.RegionalDirectorCode) LEFT JOIN Query5.Code=NewQuery.Code (LEFT JOIN Query5.Year=NewQuery.tempYear)
GROUP BY Query5.promotionType, Query5.DirectorCode, Query5.Code, Query5.Year, Query5.Month, Query5.ManagerName;
 
Last edited:
This works...

SELECT Query5.promotionType, Query5.DirectorCode, Query5.Code, Query5.Year, Query5.Month, Query5.ManagerName FROM Query5 LEFT JOIN NewQuery ON (Query5.Month = NewQuery.tempMonth) AND (Query5.promotionType=NewQuery.PromotionType) AND (Query5.DirectorCode=NewQuery.RegionalDirectorCode) AND (Query5.Code=NewQuery.Code) AND (Query5.Year=NewQuery.tempYear) GROUP BY Query5.promotionType, Query5.DirectorCode, Query5.Code, Query5.Year, Query5.Month, Query5.ManagerName;
 

Users who are viewing this thread

Back
Top Bottom