• I solved a similar problem before. Some developers for a 3rd party developed front end code that passed 250,000 individual inserts as part of an "initialization" for a new "project" in the code. After looking at their code, it turned out that the front end code was doing all of that work based on just 4 parameters. I wrote a proc to do the same thing that the front end code was doing and it ran in sub second times not to mention preventing a meltdown of the copper between the front end and the server. 😛

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