• I'd also like to recommend that you avoid 3 part naming in code. Create a synonym for the table in the other database and then stick to 2 part naming. That way, if you even move or rename the database or the table, you won't have to find all of the places it was used in code. All you'll need to do is change the synonym.

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