Afternoon,I'm sure this is easy but I can't seem to get the syntax right or maybe I'm going about it the wrong way. I need a summary total by month so I did a case statement to make a "pivot" table now I want the user to be able to select the months she wants to see. I still get all the months.Below is the code if someone could point me in the right direction I would appreciate it.Thanks,LauraSELECT January = SUM(CASE WHEN DATENAME(month, testdate) ='January' THEN 1 ELSE 0 END),February = SUM(CASE WHEN DATENAME(month, testdate) ='February' THEN 1 ELSE 0 END),March = SUM(CASE WHEN DATENAME(month, testdate) ='March' THEN 1 ELSE 0 END),April = SUM(CASE WHEN DATENAME(month, testdate) ='April' THEN 1 ELSE 0 END),May = SUM(CASE WHEN DATENAME(month, testdate) ='May' THEN 1 ELSE 0 END),June = SUM(CASE WHEN DATENAME(month, testdate) ='June' THEN 1 ELSE 0 END),July = SUM(CASE WHEN DATENAME(month, testdate) ='July' THEN 1 ELSE 0 END),August = SUM(CASE WHEN DATENAME(month, testdate) ='August' THEN 1 ELSE 0 END),September = SUM(CASE WHEN DATENAME(month, testdate) ='September' THEN 1 ELSE 0 END),October = SUM(CASE WHEN DATENAME(month, testdate) ='October' THEN 1 ELSE 0 END),November = SUM(CASE WHEN DATENAME(month, testdate) ='November' THEN 1 ELSE 0 END),December = SUM(CASE WHEN DATENAME(month, testdate) ='December' THEN 1 ELSE 0 END)FROM dbo.tblHealthwhere DATEPART(month, testdate)between '10' and '12'