• Thanks, all, for your kind words. It;s always good to know that my questions are appreciated.

    Tom Brown (12/6/2011)


    I had never heard of Nested Joins, so learned something today.

    However my method of getting the right answer was to use the execution plans. One execution plan exactly matched the nested join. Once I had the right anser, I was able to work out why. 😀

    Ha! I like the creative thinking!

    I actually used a few rows of sample data (making sure to cover every possibility) to make sure that I had not accidentally messed up the question. But your method is so much easier! (Though you have to beware of checking not just the graphical representation of the plan, but also the "hidden" extra characteristics in the properties of the operators).

    My motto is that you don't have to know everything, as long as you knnow where.how to find out - and you show that there are often even multiple answers to THAT question!


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/