Accurate floating point comparison in SQL Data Compare
This was already discussed on the Red Gate forums in 2007:
http://www.red-gate.com/messageboard/viewtopic.php?t=5875
As of SQL Data Compare 9.1.0.365, the problem still exists.
From the forum thread:
"""
I find that very often, a column containing floating point numbers will show as different [in SQL Data Compare], even though visual inspection of the results [in SQL Server Management Studio] shows that it is the same.
"""
It's difficult to know if the data in the float column has actually changed, or if it's just SQL Data Compare making an innacurate comparison.
It reduces my confidence that the data has been synchronized correctly.
In SQL Data Compare v10, there is now a “Use maximum precision for floats” option
-
Anonymous commented
Stephanie's reply does not seem to answer the question - the point is that apparently equal values are flagged as different. I don't see how this can be addressed by comparing with greater precision. I have seen the same problem, and setting 'Use maximum precision for floats' just makes the problem worse, because it throws up all of the old differences plus some more.
-
Chris commented
This is an issue in 12.1.0.3760 with the maximum precision enabled or disabled.
-
Iain Elder commented
I flagged this as inappropriate because I posted it in the SQL Source Control forum instead of the SQL Data Compare forum. Please remove this post. I have reposted in the correct forum here: http://redgate.uservoice.com/forums/147879-sql-data-compare-feature-suggestions/suggestions/2920357-accurate-floating-point-comparison-in-sql-data-com