If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > What's up with float?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-30-02, 09:53
jordipa jordipa is offline
Registered User
 
Join Date: Jan 2002
Posts: 1
Unhappy 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).
Reply With Quote
  #2 (permalink)  
Old 04-02-02, 05:27
Apel Apel is offline
Registered User
 
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.
Reply With Quote
  #3 (permalink)  
Old 04-25-02, 16:59
rnealejr rnealejr is offline
Registered User
 
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On