Float field replication

  • I have some windows nt4 with mssql7 when I set a replication of a table with the primary key type float, sometimes there are decimal errors, by example

    if the flield value is 1234.0 the replication sen the value 1233.999999999

    or 1234.0000000015

    Please help me, why this happens? and how can i fix it?

    Greeting and cheers

  • I think thats a natural sideaffect of using floats. I try to avoid them!

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • ouch! that stings.

  • I agree with Andy, and more to the point if I may, what you're seeing has nothing to do with replication. This behavior will drive you nuts when doing comparisons. Try using a CRC value to determine whether a record/tuple has changed when the data contains float data.

    Lose the float

    John Zacharkan


    John Zacharkan

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply