Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help on Outer Joins

Status
Not open for further replies.

mmt4331

Programmer
Dec 18, 2000
125
US

Got a question here...Is it possible to use an outer join on three tables. I'm trying to do this w/ the following statements in Access 97, but it won't work:

SELECT *
FROM Customer A Left Join Orders B On (A.[Customer Id] = B.[Customer Id]) Left Join [Orders Detail] C
ON (B.[Order ID] = C.[Order ID]);

BigFuzzyDog
 
Yes it is possible to do join on 3 or even more tables.
However, when you join them, it will have to show which one is joined first. In your case for example,

SELECT *
FROM [red]([/color]TableA Left Join TableB On TableA.[Customer Id] = TableB.[Customer Id][red])[/color] Left Join TableC
ON TableB.[Order ID] = TableC.[Order ID]);

That way, it recognizes that TableA and TableB are joined first, then the query is joined with TableC.

Hope it help!

Tin Tin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top