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

 Difference between Money and (Float or Decimal) Datatype Rate Topic Display Mode Topic Options
Author
 Message
 Posted Wednesday, January 16, 2013 11:36 PM
 SSC Rookie Group: General Forum Members Last Login: Thursday, April 9, 2015 11:03 PM Points: 41, Visits: 73
 What is the difference between Money and (Float or Decimal) Datatype. If we use Float or Decimal instead of Money, will we loose any functions..?
Post #1408159
 Posted Wednesday, January 16, 2013 11:40 PM
 SSC-Enthusiastic Group: General Forum Members Last Login: Wednesday, March 18, 2015 3:05 AM Points: 123, Visits: 299
 Money can take upto 5 decimal. Whereas, if you need > 5 decimal places for a value go for decimal(n,m) ______________________________________________________________________Ankit MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.You are already naked. There is no reason not to follow your heart.”
Post #1408161
 Posted Friday, January 18, 2013 9:21 AM
 Ten Centuries Group: General Forum Members Last Login: Tuesday, October 28, 2014 12:50 PM Points: 1,061, Visits: 2,580
 nagesh.prasad (1/16/2013)What is the difference between Money and (Float or Decimal) Datatype. If we use Float or Decimal instead of Money, will we loose any functions..?Money and Decimal are fixed numeric datatypes while Float is an approximate numeric datatype. Results of mathematical operations on floating point numbers can seem unpredictable, especially when rounding is involved. Be sure you understand the significance of the difference before you use Float!Also, Money doesn't provide any advantages over Decimal. If fractional units up to 5 decimal places are not valid in your currency or database schema, just use Decimal with the appropriate precision and scale. Jason WolfkillBlog: SQLSouthTwitter: @SQLSouth
Post #1408970
 Posted Wednesday, March 18, 2015 1:48 AM
 Forum Newbie Group: General Forum Members Last Login: Wednesday, March 18, 2015 1:47 AM Points: 1, Visits: 0
 The Decimal, Double, and Float variable types are different in the way that they store the values. Precision is the main difference where float is a single precision (32 bit) floating point data type, double is a double precision (64 bit) floating point data type and decimal is a 128-bit floating point data type.Float - 32 bit (7 digits)Double - 64 bit (15-16 digits)Decimal - 128 bit (28-29 significant digits)More about.....Decimal vs Double vs FloatLynda
Post #1669365
 Posted Wednesday, March 18, 2015 1:52 AM
 SSChampion Group: General Forum Members Last Login: Today @ 1:04 AM Points: 14,266, Visits: 12,259
 wolfkillj (1/18/2013)[quote]nagesh.prasad (1/16/2013)Also, Money doesn't provide any advantages over Decimal.Except when working with SSAS. Analysis Services doesn't know decimal, it only knows float and money. So if you need a precision less than 5, you better use money because it saves you a lot of expensive conversion (decimal to float) when SSAS is processing data. How to post forum questions.Need an answer? No, you need a question.What’s the deal with Excel & SSIS?Member of LinkedIn. My blog at LessThanDot. MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1669367

 Permissions