Wednesday, March 21, 2012

Dundas Web Chart Control

I'm having trouble understanding how to build my bar chart. I have a column of info called Issue and then I'm coutning the record.

I bascially need to alter my query into time periods. I need a series for quarter 1 (1/1/2006 - 3/1/2006), one for quarter 2, 3, 4 and the entire year as a whole.

Can this data all be organized in a single select query?

Here is my current query getting the year as a whole data only:

SELECT

Issue,COUNT(*)AS NumRecordsFROM CSP_Item CI

INNER

JOIN CSP_ProblemNotification CPON CP.ID= CI.CSPNum

WHERE

CP.PNDateBETWEEN'01/01/2007'AND'01/31/2007'

GROUP

BY IssueORDERBY NumRecordsASC

Maybe...

SelectDatePart(quarter, theDate) as Quarter.

group byDatePart(quarter, theDate)

No comments:

Post a Comment