Hello,
I'm trying to build a crosstab query that counts the number of proposals and groups them by start date.
I then hope to union this with similar count queries, that relate to different fields.
However, it is only including the months where there is associated info, where as i would like to include the months where nothing has been received (i.e. Every month over 2 years).
I've tried the nz on the proposals, but this only puts 0's into the months that are already icluded. I have also tried typing in the months into the properties window (Jan04, Feb04....), this only confused matters as it could not relate to the text (presumably?).
My SQL as it stands is:
Cheers
OOch
I'm trying to build a crosstab query that counts the number of proposals and groups them by start date.
I then hope to union this with similar count queries, that relate to different fields.
However, it is only including the months where there is associated info, where as i would like to include the months where nothing has been received (i.e. Every month over 2 years).
I've tried the nz on the proposals, but this only puts 0's into the months that are already icluded. I have also tried typing in the months into the properties window (Jan04, Feb04....), this only confused matters as it could not relate to the text (presumably?).
My SQL as it stands is:
Code:
TRANSFORM nz(Count([Proposal Number]),0) AS Expr1
SELECT "Proposals" AS Proposal, SBFs.[New/Renewal]
FROM SBFs, Celendar
WHERE (((nz([Start Date])) Between [Celendar]![Month Start date] And [Celendar]![Month end date]) AND ((SBFs.[Sales Channel Description]) Like "*conn*"))
GROUP BY "Proposals", SBFs.[New/Renewal]
ORDER BY Celendar.Month
PIVOT Celendar.Month;
Cheers
OOch