The SQL seems fine...but try this..SELECT [Month], [Year], EpicDeptID, DocID,CAST(CAST([Month] AS varchar(2)) + '/01/' + CAST([Year] AS varchar(4)) AS datetime) AS Survey_date, SUM(CASE WHEN RTCARE in ('1', '2', '3', '4', '5', '6','7','8','9', '10') THEN 1 else 0 END)as Overall_Total_Responses,SUM(CASE WHEN RTCARE in ('8', '9','10') THEN 1 else 0 END)as Overall_Excellent_resp,SUM(CASE WHEN RTCARE in ('7','6','5') THEN 1 else 0 END)as Overall_Good_resp,SUM(CASE WHEN RTCARE in ('4','3','2','1') THEN 1 else 0 END)as Overall_Poor_respFROM dbo.DMS_QDMgroup by [Year],[Month],epicdeptid,docid
BTW, what do you mean by "it won't take"? Is there any error returned?What error?Harsh AthalyeIndia."Nothing is Impossible"