我需要有人來糾正下面的陳述。先謝謝你。我如何得到2個不同列的相同總值
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
什麼是表的列,該錯誤是什麼? – hkutluay 2012-04-20 19:49:10
我正在做一個聚合。 – Yves 2012-04-20 19:51:13