• dwain.c (9/4/2012)


    Just a guess, but if you divide 5000/31 and add that result up 31 times, it won't equal 5000 when you're through.

    If you need it to, you can consult this article for how you can "fudge round" it so that it does.

    http://www.sqlservercentral.com/articles/Financial+Rounding/88067/

    Nah... route the unrounded partial penny errors to my bank account so I can buy a red stapler and retire early. 😀

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