Results 1 to 4 of 4

Thread: Join Help

  1. #1
    Join Date
    Feb 2002
    Location
    India
    Posts
    15

    Unanswered: Join Help

    Hi

    Will the result from queries having the following two formats be different,

    format 1.

    Select ... From A Left Outer Join B ON A.column1 = B.column1 Left Outer Join C ON
    B.column1 = C.column1

    format 2

    Select ... From A Left Outer Join B Left Outer Join C ON B.column1 = C.column1
    ON A.column1 = B.column1

    Thx

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    good question, but either one or both of those will be rejected with a syntax error -- you may have to use parentheses

    in essence, though, because of the columns you're joining on, you should get the same results

    it would be a different story if one of the joins was inner and the other outer, or if it were A left joining B and A also left joining C

    rudy
    http://rudy.ca/

  3. #3
    Join Date
    Feb 2002
    Location
    India
    Posts
    15
    Hi

    Thanks for the reply. Do you have any examples to substantiate this. I tried lot of examples and the results are not different.

    Thx

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Do you have any examples to substantiate this. I tried lot of examples and the results are not different.
    actually, that's what i said -- "you should get the same results" for the examples that you gave

    1 A Left Join B ON A.x=B.x Left Join C ON B.x=C.x
    2 A Left Join B Left Join C ON B.x=C.x ON A.x=B.x

    for other examples, especially mixing Inner joins with Left joins, you could expect differences

    sorry if i confused you

    rudy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •