I'm not sure how to phrase this question, or what I even need to be looking for, but here goes.
I have the following table:
Date (datetime) | Data (varchar) | State (varchar)
2010-05-08 12:35:29.998 | Interested in proposal | California
2010-06-08 12:35:29.998 | Interested in proposal | California
2010-06-09 12:35:29.998 | Interested in trial | Texas
2010-08-08 12:35:29.998 | Interested in demo | California
What I am trying to do is organize the data into a table to generate reports based on some small criteria (Is it a demo, trial, or proposal they are requesting?). What my goal is to end up with something like this:
State | January | February | March | April | ....
Alabama | 3 | 0 | 2 | 10 | ...
California | 10 | 2 | 0 | 9 | ....
I have a query that does some of this. It can group the data in the following format:
state | Total | Month
Alabama | 10 | 1
Alabama | 2 | 2
Alabama | 3 | 3
The problem I have, is I can't easily loop through this row-by-row and insert it into a table. I've been looking around and thinking of ways t
View Complete Post