Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2002
    Posts
    1

    Unhappy Unanswered: What's up with float?

    When I show the value of a float import with Enterprise manager, it returnsEX: 60.1012), but if i try to show it with Query analyzer, it's diferent!!!! (Ex: 60.1012000000000002)

    But I don't know, why???

    I'm sure this affects my ASP aplication.(Hello Jordi from Barcelona).

  2. #2
    Join Date
    Apr 2002
    Location
    Germany
    Posts
    228
    I don't know about the progs you are using specifically but I assume they just display the value in different precision. Maybe there's an option in Enterprise Manager to control display precsion of float values (maybe someone with more insight can guide you the way).

    In general you should be aware of rounding when handling float values. Even simple calculations can cause rounding errors and might accumulate over time. If you need to be sure your data is and stays the same precision use the numeric data type instead of float.

  3. #3
    Join Date
    Feb 2002
    Posts
    2,232
    Use numeric or decimal data types - float/real are approximations - that is why you are receiving additional information.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •