View Single Post
  #2  
Old June 4th, 2010, 08:23 PM posted to microsoft.public.access.queries
Ken Snell
external usenet poster
 
Posts: 177
Default Forcing an ambiguous outer join

How about if you post the original query's SQL where you got the error
message about ambigous joins? Let's see if we can debug that query before we
come to any conclusions about whether you need to combine these two queries
or not.

--

Ken Snell
http://www.accessmvp.com/KDSnell/


"AccessKay" wrote in message
...
I tried to add another table to my query with a Left join and I receive a
message that my SQL contains ambiguous joins. It went on to say that I
needed to create a separate query and I think it was telling me to combine
the two. So I tried to do so but I received a syntax error about a
missing
operator. I searched the previous posts and then added the parentheses.
Would you mind helping me put these two SQLs together? Thanks!!!

Qry1
SELECT tblTransData.number, tblTransData.Empl, tblTransData.[cost code],
tblTransData.[project alias], tblTransData.[cost category],
tblCostCat.TypeID, tblTransData.Trans_Date, tblTransData.TotHrs
FROM tblCostCat LEFT JOIN tblTransData ON tblCostCat.CostCatNm =
tblTransData.[cost category];

Qry2
SELECT tblTransData.number, tblTransData.Empl, tblTransData.[cost code],
tblTransData.[project alias], tblTransData.[cost category],
tblTransData.Trans_Date, tblTransData.TotHrs, tblCostCode.IndirectLabel
FROM tblCostCode LEFT JOIN tblTransData ON
tblCostCode.CostCode=tblTransData.[cost code];

My attempt to join them together:
SELECT tblTransData.number, tblTransData.Empl, tblTransData.[cost code],
tblTransData.[project alias], tblTransData.[cost category],
tblCostCat.TypeID, tblTransData.Trans_Date, tblTransData.TotHrs,
tblCostCode.IndirectLabel
FROM tblCostCat LEFT JOIN tblTransData ON (tblCostCat.CostCatNm =
tblTransData.[cost category]) AND tblCostCode LEFT JOIN tblTransData ON
(tblCostCode.CostCode=tblTransData.[cost code]);

This is where I received the missing operator error