W
Woody
I have a function with code like the following:
SELECT InvNum, InvRate, Elapsed, ROUND((InvRate * Elapsed), 2) AS Charged
The result of this query shows the Charged column with four decimals and
what I want is two. Setting format on the field doesn't work. Anyone know
how to do this? This is with SQL Server 2005. InvRate is a money field and
Elapsed is a decimal (19,4). I supposed it needed to be 19,4 but maybe
that's the problem. Does it need to be 19,2? I supposed I needed the four
decimals for greater accuracy, but maybe I am mistaken, the user is neer
going to enter more decimal places than two. Am I using the Round function
correctly? If so, I don't understand why I am getting four decimal places.
Thank you.
SELECT InvNum, InvRate, Elapsed, ROUND((InvRate * Elapsed), 2) AS Charged
The result of this query shows the Charged column with four decimals and
what I want is two. Setting format on the field doesn't work. Anyone know
how to do this? This is with SQL Server 2005. InvRate is a money field and
Elapsed is a decimal (19,4). I supposed it needed to be 19,4 but maybe
that's the problem. Does it need to be 19,2? I supposed I needed the four
decimals for greater accuracy, but maybe I am mistaken, the user is neer
going to enter more decimal places than two. Am I using the Round function
correctly? If so, I don't understand why I am getting four decimal places.
Thank you.