I never thought of using parens to specify how the joins work. I'll give
that a try.

Phillip B.

www.LoungeRoyale.com
www.FillWorks.com
----- Original Message -----
From: "Selene M. Bainum" <[EMAIL PROTECTED]>
To: "SQL" <[EMAIL PROTECTED]>
Sent: Thursday, September 04, 2003 9:45 AM
Subject: RE: Can I inner join and outer join in the same query?


> Actually, that is not correct.  You can mix inner and outer joins.  The
trick is to use parens to tell you, and SQL, how the joins work. Think of
everything in a set of parenthesis as a table that will be joined with
another:
>
> FROM (((TableA A INNER JOIN TableB B ON A.ID = B.ID)
> INNER JOIN TableC C ON B.ID2 = C.ID2)
> LEFT OUTER JOIN TableD D ON A.ID = D.ID)
> LEFT OUTER JOIN TableE E ON A.ID = E.ID
>
> Selene Bainum
> [EMAIL PROTECTED]
> http://www.webtricks.com
>
> ________________________________
>
> From: Phillip B [mailto:[EMAIL PROTECTED]
> Sent: Thu 9/4/2003 10:38 AM
> To: SQL
> Subject: Can I inner join and outer join in the same query?
>
>
>
> I'm writing a query that requires a few joins in it. If I use all inner
> joins, the query works but leaves out the records that are missing info in
> joined tables. If I write is using left outer joins it wont return any
> records at all. With that said, it leads me to believe that you cant mix
> your join types in a query and that multiple outer joins wont work at all.
> Does this sound write?
>
> Phillip B.
>
> www.LoungeRoyale.com
> www.FillWorks.com
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:6
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:6
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=<:emailid:>.<:userid:>.<:listid:>

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

                        

Reply via email to