Hi
I have a crosstab query that counts a field for me. I also want to count that same field for a date range (i.e. # of items 0-15, # of items 16-20, etc.).
Here's what the results should look like:
Owner Totals 0-15 16-20 21-25 26-30 Over 30
Anderson, LaTayna 6
DeGeorge, Jim 24
DiLaurenzio, Rob 9
Frasciello, Giulio 13
Gadson, Reggie 8
Geremia, Charlie 7
Ittner, Tom 3
Mascialino, Bob 8
Olgiati, Roberta 2
I'm using this SQL
but all that does is give me each date as the column heading. Is there a way to do this so I can get my desired column headings and a count of the DueDate field with conditions?
Jim DeGeorge![[wavey] [wavey] [wavey]](/data/assets/smilies/wavey.gif)
I have a crosstab query that counts a field for me. I also want to count that same field for a date range (i.e. # of items 0-15, # of items 16-20, etc.).
Here's what the results should look like:
Owner Totals 0-15 16-20 21-25 26-30 Over 30
Anderson, LaTayna 6
DeGeorge, Jim 24
DiLaurenzio, Rob 9
Frasciello, Giulio 13
Gadson, Reggie 8
Geremia, Charlie 7
Ittner, Tom 3
Mascialino, Bob 8
Olgiati, Roberta 2
I'm using this SQL
Code:
TRANSFORM Count(tblGaps.[Gap#]) AS [CountOfGap#]
SELECT tblPassword.User AS Owner, Count(tblGaps.[Gap#]) AS Totals
FROM tblGaps LEFT JOIN tblPassword ON tblGaps.NFS_Owner = tblPassword.[UserID#]
GROUP BY tblPassword.User
ORDER BY tblGaps.DateDue
PIVOT tblGaps.DateDue;
but all that does is give me each date as the column heading. Is there a way to do this so I can get my desired column headings and a count of the DueDate field with conditions?
Jim DeGeorge
![[wavey] [wavey] [wavey]](/data/assets/smilies/wavey.gif)