A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Forcing an ambiguous outer join



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old June 4th, 2010, 04:12 PM posted to microsoft.public.access.queries
AccessKay
external usenet poster
 
Posts: 106
Default Forcing an ambiguous outer join

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.