Decimal Float Conversion (1 Viewer)

cable

Access For My Sins
Local time
Today, 14:44
Joined
Mar 11, 2002
Messages
228
I've come across an issue with sql server 2000 and I was wondering what the best technique is for dealing with it.

I've got a table of rates which the user updates via a gui. These are stored as decimal (38,4) values.

I was testing a colleagues piece of code that was using one of these rates, and he'd stored the value in a temporary float.

The value in the table was 0.3500 and the float value came out as 0.34999999999999998 :eek::confused:

I've tried various cast/convert combo's but I cannot get the float to have the same value as the source.

Firstly can someone explain how the hell it came up with that number?
Secondly is there something I can do to resolve it?
 

Users who are viewing this thread

Top Bottom