March 19, 2014 at 5:32 am
Hi,
I have already summed the values and this below query sum the values and returns zero if there are no values. How can I roundoff the values for these columns.
isnull(sum([Old_Values]),0) [Old Values],
[New_Value] = isnull(sum([Yearly_Value]-[Previous_Year_Value]),0)
Even this query I use for calculation and I need to round off the values
[Product_Price] = [Product_Profit]/4,
[Product_Profit] = [ActualValue] * 0.75,
[GrossValue]
March 19, 2014 at 6:46 am
Use the ROUND (http://technet.microsoft.com/en-us/library/ms175003.aspx) function and place the calculation inside as the numeric expression.
[New_Value] = ROUND( isnull(sum([Yearly_Value]-[Previous_Year_Value]),0) , 1)
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply