Home Forums SQL Server 7,2000 T-SQL Query help: OUTER JOIN with GROUP BY clause RE: Query help: OUTER JOIN with GROUP BY clause

  • That's right.

    You need to be careful with OUTER JOINS when applying ON & WHERE conditions.

    Both are filters but ON is applied before Outer rows are added.

    This is the sequence :

    1) CROSS JOIN applied

    2) ON filter applied

    3) Outer rows of preserved table added

    4) WHERE filter applied

    So even if you have outer rows in your intermediate result the WHERE filter will remove those which do not yield TRUE for it's clause...

    "The price of anything is the amount of life you exchange for it" - Henry David Thoreau