• jonatan.carlberg (8/29/2014)


    Hi again!

    Thank you all for welcoming me to the forum. As you probably see, I've posted a clarification on my previous post.

    Thanks for all input so far.

    From what I can see, the to examples (i.e. solutions) they just create a temp table, so nothing will be altered in the real tables, right?

    Once again thank you!

    Hi Jonatan

    Can you please set up the sample data in the same way as I did in an earlier post in your thread, using CREATE TABLE/INSERT? This provides us all with a number of great advantages - which is all good news for you. Many thanks.

    “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