• The big thing missing from Aaron's blog is the code he used for each test. 😉 Didn't see much on accuracy, either...

    I agree about the MONEY datatype, though... I'd just as soon it weren't available...

    DECLARE @dOne DECIMAL(20,4),

    @dThree DECIMAL(20,4),

    @mOne MONEY,

    @mThree MONEY,

    @fOne FLOAT,

    @fThree FLOAT

    SELECT @dOne = 1,

    @dThree = 3,

    @mOne = 1,

    @mThree = 3,

    @fOne = 1,

    @fThree = 3

    SELECT @dOne/@dThree*@dThree AS DecimalResult,

    @mOne/@mThree*@mThree AS MoneyResult,

    @fOne/@fThree*@fThree AS FloatResult

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