Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Difference of two float value columns gives me strange results

$
0
0

Hi,

I am trying to find the difference, if any , of two float type column values from two tables. Though the values look exactly similar, the difference operation shows it as difference.

select F1.Value1as  F1_Value,F2.value1 F2_Value ,abs(F1.Fact_Value-F2.Fact_value)asdifffromTable1 F1 innerjoinTable2 F2ONF1.Code=F2.Code

ex : Table1 value - Table2 Value - Difference

       14567.89      14567.89     0

       125699         125699        0.0135

Please let me know how to compare the float values.

Regards,

Ancy


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>