• Erland Sommarskog (8/18/2013)


    Jeff Moden (8/18/2013)


    Even if it coud be done efficiently, I'd still like to know why someone is building a result set that contains 20 million rows.

    So Curious_sqldba did mention that he also ran the query in SSIS. I assume that he exporting the data. For which, of course, SSMS is not a good tool.

    Agreed... that's why I hate to assume and asked the question.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)