1 Replies - 555 Views - Last Post: 27 January 2012 - 02:32 PM Rate Topic: -----

Topic Sponsor:

#1 scolty  Icon User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 259
  • Joined: 27-April 11

Loading data into column float datatype, significant figures question.

Posted 26 January 2012 - 05:07 AM

Morning, Im curious as to what you guys would suggest regarding the following issue(im not 100% sure it is one).

Below is a screen dump showing the original data on the right, and the data that was imported on the left. Obviously the left contain the additional digits because it a float and has to approx a value.

[QUESTION] could this possibly be an issue?? I have a gut feeling that it could be if im performing alot of addition/subtraction operations on the data.

[QUESTION]If i am correct, is there a way to round each of the values automatically??

Thanks again for your help

Posted Image

This post has been edited by scolty: 26 January 2012 - 05:08 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Loading data into column float datatype, significant figures question.

#2 nK0de  Icon User is offline

  • can't spell BITCH without IT
  • member icon

Reputation: 183
  • View blog
  • Posts: 732
  • Joined: 21-December 11

Re: Loading data into column float datatype, significant figures question.

Posted 27 January 2012 - 02:32 PM

seeing the 2 columns' names as bidPrice and askPrice, I suppose those columns store currency values, am I right? Don't use float for that.
I guess you're using SQL Server 2008.. I suggest you use the data types money or smallmoney which are specifically to store currency values. read about it here

Or you can use decimal data type too. And you can even set the precision point.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1