I have a table in sql server containing a float field. This field displays a different number of decimals from row to row. I know for a fact that a float field CAN NOT contain the exact value 3173.77, so some rounding is going on here below:
SELECT Weight ... FROM ... WHERE ...
result :
3173,77001953125
3173,77
but somehow sqlserverstudio somehow rounds to different lengths. Is this because a precision is stored ?
SELECT CAST(Weight AS DECIMAL(38,30)) ... FROM ... WHERE ...
result :
3173.770019531250000000000000000000
3173.769999999999981810105964541435
or is this because the second number in this case can round to 3173.77000000000000