Microsoft Money

  • We are trying to decide if we should use Money or Decimal(9.2) for our currency columns and are wondering why MS created Money datatype if decimal produces more accurate results?

  • if i am not mistaken the money type placse the $ infront of the number where as decimal does not

  • after looking it does not put the $ inf ront of the number but try this little script and then rethink your question.

    declare @int money

    declare @int2 decimal(9,2)

    set @int = '88.5555555555555666666666666'

    set @int2 = 88.55555555555556666666666666

    select @int, @int2

    which is more accurate

  • Quoting Books online..

    The money and smallmoney data types are accurate to a ten-thousandth of the monetary units that they represent.

    Ans it does not represent currency symbol...


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • What is being presented to me is the following SQL:

    DECLARE @dOne DECIMAL(10,2),

    @dThree DECIMAL(10,2),

    @mOne MONEY,

    @mThree MONEY,

    @fOne FLOAT,

    @fThree FLOAT

    SELECT @dOne = 1,

    @dThree = 3,

    @mOne = 1,

    @mThree = 3,

    @fOne = 1,

    @fThree = 3

    SELECT @dOne = @dOne/@dThree*@dThree ,

    @mOne = @mOne/@mThree*@mThree ,

    @fOne = @fOne/@fThree*@fThree

    SELECT @dOne AS DecimalResult,

    @mOne as MoneyResult,

    @fOne as FloatResult

    produces DecimalResult = 1.00

    Money Result = .999999

    FloatResult = 1

  • I've avoided money as I'm not sure if provides benefits over the numeric types. It also limits me, and I prefer to not be limited. I let the application handle the decisions on formatting and presentation.

  • well said, I agree 100%

  • The money data type is not an MS construct.

    It came over with the original Sybase SQL Server code.

  • The results you are getting have to do with rounding rules.

    They may be related to accounting rounding rules.

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply