• Rick44 (8/16/2013)


    Hi. A count of total clients enrolled during the month.

    Total_Clients_Enrolled Month Year

    1 8 2009

    1 6 2009

    1 7 2009

    I seem to be missing something. Why only 3 months? And why are the counts all 1? There seems to be more rows with those months and there are certainly more dates than those three. Basically your view will have to be the aggregate data you want for every month and then you will filter it down with a where clause. If you can help me understand your requirements I will jump in and help...right after the weekend to which I am headed right now. 😀

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/