Hi PRA,
You need to use ISNULL function.
Refer below query.
SQL
DECLARE @Result TABLE (id INT, smoney FLOAT, fmoney FLOAT)
INSERT INTO @Result(id, smoney, fmoney)VALUES(1, 3500, null)
INSERT INTO @Result(id, smoney, fmoney)VALUES(2, 3000, null)
INSERT INTO @Result(id, smoney, fmoney)VALUES(3, 2500, null)
SELECT id,ISNULL(smoney,0)+ISNULL(fmoney,0)summa FROM @Result
Output
id |
summa |
1 |
3500 |
2 |
3000 |
3 |
2500 |