• drew.allen - Monday, September 17, 2018 8:49 AM

    I don't consider this a CROSS JOIN.  It's an INNER JOIN on GPID and Name.  A CROSS JOIN would produce 36 rows, whereas this only has 18.

    Drew

    It's true that the words CROSS JOIN aren't used but the end result would be a CROSS JOIN if there weren't criteria to limit it to "only" 36 rows as in a "Triangular Join", which is still a form of CROSS JOIN.  Heh... the term CROSS JOIN is easier to say than something like "Constrained Many-to-Many Join" or some such and is a bit more clear for people who don't understand what a "Triangular Join" is, regardless of the syntax used to get there.

    I do agree, however, that a lot of people might go looking for the words "CROSS JOIN" instead of looking for the "implicit" cross join formed by the inner join.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)