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.
Author |
Topic |
vignesht50
Yak Posting Veteran
82 Posts |
Posted - 2014-03-13 : 11:04:38
|
Hi,I am using the below query to calculate column values. But I need to return zero when a column values is empty or null.select [Funding] [Fundings], [Original] AS [Originals],[Variance] = SUM([Previous_Year]-[Current_Year]),[SumValue] = SUM([CurrentYear]/4), [ActualValue] = SUM([Variance] * 0.75),[FinanceYear], [New Value] = SUM([Previous_Year]+[Current_Year]) from FinanceGROUP BY [Original], [FinanceYear]Any suggestions? |
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2014-03-13 : 11:43:01
|
ISNULL(columnName,0) -- If NULL replace with 0CheersMIK |
|
|
|
|
|