Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 storing decimal values

Author  Topic 

Sean_B
Posting Yak Master

111 Posts

Posted - 2007-08-07 : 09:26:42
Hi,

I'm loading millions of rows into a database table. This data contains a lot of dedcimal values of 4 or 6 decimal places somtimes more.

I've found that storing them as floats is inaccurate, and I'm storing as decimals of the appropriate length.

I'm concerned whether this is the right way to do this ?

Can anyone make any suggestions, perhaps an article that I should take a look at ?


Sean

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2007-08-07 : 09:48:20
Yes, storing a decimal as a decimal is the correct thing to do.
[EDIT] Look in BOL for "Data Types"

[Signature]For fast help, follow this link:
http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx
Learn SQL
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

Sean_B
Posting Yak Master

111 Posts

Posted - 2007-08-07 : 11:29:52
Thanks.

Sean
Go to Top of Page
   

- Advertisement -