Bruce,
Thanks for the quick post. I had to add 'END' in each of the Case Statements. Otherwise it worked great!!


VB Code:
  1. SELECT INCIDENT_TYPE,
  2.    COUNT(CASE WHEN Year(Received_Dt) = 2004 THEN 1 ELSE 0 [b]END[/b]) AS C2004,
  3.    COUNT(CASE WHEN Year(Received_Dt) = 2003 THEN 1 ELSE 0 [b]END[/b]) AS C2003
  4. FROM dbo.INCIDENTS
  5. GROUP BY INCIDENT_TYPE

I had to add 'END' in each of the Case Statments. Otherwise it worked great!!



Thanks