• Almost forgot... at my previous job, the archive process ran nightly. At my current job, it runs on Monday and Thursday nights. First run may take a day or more to complete, but it's online all the time. After that, the daily jobs (same as the first job) are a piece of cake and may only take a couple of seconds to execute depending, of course, how many rows slip past your cutoff date on any given day.

    Some folks have suggested that such a thing be built into a trigger... past experience tells me that will eventually turn out to be a source of deadlocks on high volume systems.

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