• I'd define the column in the table as a PERSISTed Computed column to make life easier for everyone and the formula would simply be the addition of the other columns.

    As a bit of a sidebar, NUMERIC(12,2) has a precision of 12 and that takes 9 bytes of storage. NUMERIC(19,2) has a precision of 19 but, guess what? It still "only" takes 9 bytes of storage.

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