Goodangel Matope
asked on
SQL Server precision differing from excel precision
I have developed a treasury system for a company that was using Microsoft Excel for their processing. I have moved most of the processing into SQL Server procedures and functions. The interesting thing is that for large values, the calculations in SQL Server and those in excel yield different values. Is this a data type issue? I am using DECIMAL(38,2) for all currency values. I am puzzled as to why we are getting different values after using the same formulae in excel and SQL Server.
The decimal format stores numbers in SS2000 as BCD (binary coded decimal) with a maximum precision of 38 digits. Excel is using floating-point which has less precision. However, if you perform math operations with the numbers you may find that your application introduces loss of precision (due to intermediate rounding) with either data.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.