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
 decimal places

Author  Topic 

pmccann1
Posting Yak Master

107 Posts

Posted - 2006-11-30 : 04:24:10
is there a way with a float datatype to choose the number of deicmal places to use

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-30 : 04:28:26
No.
Either use DECIMAL or NUMERIC.
Or MONEY if four decimals are enough.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-11-30 : 08:49:08
quote:
Originally posted by pmccann1

is there a way with a float datatype to choose the number of deicmal places to use


The float datatype doesn't actually support decimal places at all, because the data is represented internally as a binary fraction that may or may not have an exact decimal equivilant.



CODO ERGO SUM
Go to Top of Page
   

- Advertisement -