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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 precisions of datatypes

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-08-11 : 08:33:42
genuine writes "hello

i m working on the stored procedures in SQL that computes the division of two columns having smallint as their datatype,for each row , the results are stored in a column of another table the datatype of the result is taken as float but it is correct upto 1 decimal place
How do i increase the precision of float data type that gives the correct result "

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-08-11 : 08:35:00
You can't. Float and real are approximate and will always have some discrepancy. If you need precise decimals, you need to use numeric or decimal datatypes. You might get by with money or smallmoney, they have 4 decimals of precision.
Go to Top of Page
   

- Advertisement -