I have a stored procedure as follows:
CREATE PROC [dbo].[Incidents] (@SiteName varchar(200)) AS SELECT ( SELECT SUM(i.Logged) FROM tbl_Sites s
Just ran into this problem, Kirtan's solution worked for me well, but the syntax was a little off. I did like this:
ISNULL(SUM(c.Logged), 0)
Post helped me solve my problem though so thanks to all.