Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 Microsoft Money Rate Topic Display Mode Topic Options
Author
 Message
 Posted Friday, January 8, 2010 6:54 AM
 Forum Newbie Group: General Forum Members Last Login: Friday, November 19, 2010 11:49 AM Points: 5, Visits: 17
 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?
Post #844257
 Posted Friday, January 8, 2010 7:20 AM
 SSC Rookie Group: General Forum Members Last Login: Friday, September 24, 2010 6:57 AM Points: 41, Visits: 8
 if i am not mistaken the money type placse the \$ infront of the number where as decimal does not
Post #844286
 Posted Friday, January 8, 2010 7:23 AM
 SSC Rookie Group: General Forum Members Last Login: Friday, September 24, 2010 6:57 AM Points: 41, Visits: 8
 after looking it does not put the \$ inf ront of the number but try this little script and then rethink your question.declare @int moneydeclare @int2 decimal(9,2)set @int = '88.5555555555555666666666666'set @int2 = 88.55555555555556666666666666select @int, @int2which is more accurate
Post #844291
 Posted Friday, January 8, 2010 7:31 AM
 SSCommitted Group: General Forum Members Last Login: Friday, December 11, 2015 9:38 PM Points: 1,646, Visits: 1,949
 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 MedishettyBlog -- LearnSQLWithBruJoin on Facebook Page Facebook.com\LearnSQLWithBru Twitter -- BruMedishetty
Post #844306
 Posted Friday, January 8, 2010 7:51 AM
 Forum Newbie Group: General Forum Members Last Login: Friday, November 19, 2010 11:49 AM Points: 5, Visits: 17
 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 FloatResultproduces DecimalResult = 1.00Money Result = .999999FloatResult = 1
Post #844338
 Posted Friday, January 8, 2010 8:02 AM
 SSC-Dedicated Group: Administrators Last Login: Today @ 2:55 PM Points: 34,371, Visits: 18,589
 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. Follow me on Twitter: @way0utwestForum Etiquette: How to post data/code on a forum to get the best help
Post #844351
 Posted Friday, January 18, 2013 12:38 PM
 SSC Rookie Group: General Forum Members Last Login: Tuesday, October 6, 2015 10:27 PM Points: 25, Visits: 50
 well said, I agree 100%
Post #1409066
 Posted Friday, January 18, 2013 12:56 PM
 Old Hand Group: General Forum Members Last Login: Saturday, February 28, 2015 10:12 AM Points: 329, Visits: 1,019
 The money data type is not an MS construct.It came over with the original Sybase SQL Server code.
Post #1409073
 Posted Friday, January 18, 2013 1:02 PM
 Old Hand Group: General Forum Members Last Login: Saturday, February 28, 2015 10:12 AM Points: 329, Visits: 1,019
 The results you are getting have to do with rounding rules.They may be related to accounting rounding rules.
Post #1409074

 Permissions