• Wow... although I've not needed to use it, I've heard about TableSample before. Didn't know it would return a random number of rows in the rows mode. What a POS command it is. If you use (10 rows) on a 10,000 row table, you get 0 rows. The guys that put that on together need a porkchop dinner Moden style! 😛

    --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)