Bruce,
Thanks for the quick post. I had to add 'END' in each of the Case Statements. Otherwise it worked great!!
VB Code:
SELECT INCIDENT_TYPE, COUNT(CASE WHEN Year(Received_Dt) = 2004 THEN 1 ELSE 0 [b]END[/b]) AS C2004, COUNT(CASE WHEN Year(Received_Dt) = 2003 THEN 1 ELSE 0 [b]END[/b]) AS C2003 FROM dbo.INCIDENTS GROUP BY INCIDENT_TYPE
I had to add 'END' in each of the Case Statments. Otherwise it worked great!!
Thanks




Reply With Quote