By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,978 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,978 IT Pros & Developers. It's quick & easy.

More than 1 "LEFT OUTER JOIN"

P: 28
I have a query that currently pulls data from a main table and a second table using LEFT OUTER JOIN. I know how to do make another LEFT OUTER JOIN with the main table, but I want to add another LEFT OUTER JOIN to the second table. So I want the third table to be joined through the second table, not the main table.

Here is my original code that joins the main table and the second table

SELECT t1.supply,
t2.inventory,
FROM MAIN_TABLE t1
LEFT OUTER JOIN TABLE2 t2
ON t1.supply = t2.supply

I want to add another "LEFT OUTER JOIN" that joins table2 and table3 like this:


SELECT t1.supply,
t2.inventory,
t3.description
FROM MAIN_TABLE t1
LEFT OUTER JOIN TABLE2 t2
ON t1.supply = t2.supply
LEFT OUTER JOIN TABLE3 t3
ON t2.inventory = t3.inventory

But I keep getting errors. Could someone please point me in the right direction?

Thanks!
Nov 16 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 487
How can you left join 3 tables with 2 different IDís?
Point what is the error itís showing.
Nov 17 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.