• crazy_new (2/5/2014)


    My boss wants this script as a view, and I told him you cant put this in a view, just wanted to make sure im right.

    Thanks for your help man, I really appreciate it

    You need to know the answer to this: what's going to consume a result set with an unknown number of columns?

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden