Why don't you just CAST(decimal, 15,10) or so to get the precision you want?
Be careful if your are using float or real. Those datatypes are not precise and rounding errors are possible, and if you multiply an integer or decimal with a float, the result will be automatically converted to a float. If accuracy is important, cast everything to a decimal datatype first.
Jacco Schalkwijk MCDBA, MCSD, MCSE
"Dan" <kjllkjlklkjlkjlkj.com> wrote in message news:utIYGtxRDHA.2196TK2MSFTNGP11.phx.gbl...
SQL Server by default i suppose rounds values in a view. Maybe to 6 digits? I am not sure. I am talking about rounding numbers that are a calculated value.
What I have been doing to get more decimals afer the decimal place is something like this....
field1 * field2 * 1.000000000000 as fieldTotal
this seems to work... although on one field it won't. This field is based on several other calculated fields in a subquery (which I also use the * 1.0000000000 syntax)...
My issue is that it keeps returning as an example 0.002156
Instead of the proper value which is 0.0021555
This is important as it noticably throws of the accuracy of the results. I have a subquery that uses this number as a calculation. It makes it very noticeable.
What is the issue here? Why do I have to put up with this ? Ugggg!
Is it because maybe I have reached a maximum record length ? I cant see this being an issues though as a max record length is 8000 or so... I should be nowhere near that...
Any idea on what to do?