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
 Handling Decimals in Creation of Table

Author  Topic 

tmcrouse
Starting Member

12 Posts

Posted - 2014-09-29 : 13:39:53
I have a table I am trying to create and one of the columns needs to have a decimal that appears as 00.00 and does not round because the data example is 87.09, 86.50, 98.55 etc. I have tried every type of decimal formatting when creating I can find and nothing has worked. When I create the table and upload the data it keeps rounding like this: 87.00, 87.00, 99.00

Anyone know how to fix this? The only way it does not round is if I do it as a char but that does not seem right when dealing with numerics.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-09-29 : 13:49:52
It sounds like it's due to how you are importing the data. How is that being done?

I'd probably use decimal(18,2) for the data type, but that depends on the data. You may be able to use a lower precision. http://msdn.microsoft.com/en-us/library/ms187746.aspx

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -