I need someone to correct the statement below please. Thank you in advance.
SELECT CATEGORY
--WHAT PERIOD?
,'P3' AS PERIOD
,'2013' AS FISCALYEAR
,COUNT(CASE SecurityLayer WHEN 'dblayer' THEN SecurityLayer ELSE '' END) DB_SEC_COUNT
,COUNT(CASE SecurityLayer WHEN 'Applayer' THEN SecurityLayer ELSE '' END) APP_SEC_COUNT
FROM [db_eCAM].[dbo].[tbl_SecChecks]
GROUP BY CATEGORY
Are you trying to return the # of times each of those things matches? Then use
Try that.