• battula.praveen (3/29/2010)


    See this small example and check that helps.

    http://praveenbattula.blogspot.com/2009/05/how-to-generate-random-numbers-in-t-sql.html

    The only problem with that is that it uses RAND() alone and is good for only one row at a time.

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