[AccessD] pivot query

Gustav Brock Gustav at cactus.dk
Thu Jan 1 15:45:18 CST 2009


Hi Pedro

How about this (air code):

TRANSFORM Count(qryPerioden.AX) AS CountOfAX
SELECT qryPerioden.Soort_nr, qryPerioden.Kerkdorp, Count(qryPerioden.AX) AS [Total Of AX],
   IIf([datum]<#01-01-1994#, "Oud", "Nieuw") As Period
FROM qryPerioden
WHERE [datum] Between #1980/01/01#  And  #2008/12/31#
GROUP BY qryPerioden.Soort_nr, qryPerioden.Kerkdorp, IIf([datum]<#01-01-1994#, "Oud", "Nieuw")
PIVOT Format([datum],"yyyy");

/gustav

>>> pedro at plex.nl 01-01-2009 22:15 >>>
Hello Group,

first all the best for 2009.

I have a pivot query.

TRANSFORM Count(qryPerioden.AX) AS CountOfAX
SELECT qryPerioden.Soort_nr, qryPerioden.Kerkdorp, Count(qryPerioden.AX) AS [Total Of AX]
FROM qryPerioden
GROUP BY qryPerioden.Soort_nr, qryPerioden.Kerkdorp
PIVOT Format([datum],"yyyy");


I want in the same query a statement, so that i get also the count of two periods;
Between #01-01-1980#  and #31-12-1993#              and           Between #01-01-1994#  and #31-12-2008#

I can't have tried, but i can't get it done.

Who can help me?

Thanks

Pedro





More information about the AccessD mailing list