I need help!
I have a table named tblCases that includes records with a field dteFiled. I need a query that will Count each record for each month with in a year. The query below does this but if there are no records within a particular month then it excludes that month.
SELECT month(dteFiled) AS [Month],
COUNT(*) AS NoAsset
FROM tblCase
WHERE
YEAR(dteFiled) = 2007
AND intDeleted = 0
AND intType = 8
AND vchPerson = 'RLW'
GROUP BY month(dtePetitionFiled)
ORDER BY month(dtePetitionFiled)
Results should be
1 23
2 34
3 0
4 65
5 0
6 89
7 12
8 0
9 23
10 23
11 0
12 0
But it excludes, the months with 0 values and I need those values.
I have a table named tblCases that includes records with a field dteFiled. I need a query that will Count each record for each month with in a year. The query below does this but if there are no records within a particular month then it excludes that month.
SELECT month(dteFiled) AS [Month],
COUNT(*) AS NoAsset
FROM tblCase
WHERE
YEAR(dteFiled) = 2007
AND intDeleted = 0
AND intType = 8
AND vchPerson = 'RLW'
GROUP BY month(dtePetitionFiled)
ORDER BY month(dtePetitionFiled)
Results should be
1 23
2 34
3 0
4 65
5 0
6 89
7 12
8 0
9 23
10 23
11 0
12 0
But it excludes, the months with 0 values and I need those values.