Need help to write a loop store procedure

  • Krasavita (10/26/2009)


    Thank you, but this code I run takes to long and Begin Tran takes much faster,do you know why?

    I suppose it's possible that the optimizer is locking the whole table (probably a good thing in this case) when you use Begin Tran. It that works for you, go ahead an use it. It shouldn't have been needed, though.

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

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply