• brett.y (9/4/2014)


    Thanks for the help!

    It is true (of course) that the WHERE clause sorts out the LEFT OUTER JOIN (thanks). The only niggle is I remember moving the a.batch = 105 from a WHERE to the JOIN for what was a valid reason at the time but cannot remember the details now. Perhaps I should leave both in???

    Thanks so much 🙂

    I usually put filters in the ON clause when I filter on columns from the right table and there might be issues with NULL values (because non-matching rows will get all NULL values for columns of the right tables).

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP