Connecting Tech Pros Worldwide Forums | Help | Site Map

Crosstab query

Newbie
 
Join Date: Oct 2007
Posts: 9
#1: Nov 7 '07
Hi all

TRANSFORM Sum(qryALLTEL1.SumOfAmount) AS SumOfSumOfAmount
SELECT qryALLTEL1.[Master Acct #], qryALLTEL1.[Account #], qryALLTEL1.CostCenter, qryALLTEL1.Purpose
FROM qryALLTEL1
GROUP BY qryALLTEL1.[Master Acct #], qryALLTEL1.[Account #], qryALLTEL1.CostCenter, qryALLTEL1.Purpose
PIVOT Format([Date],"mmm") In ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug"," Sep","Oct","Nov","Dec");

This is the query "qryAlltel1"

SELECT [Accounts].[CostCenter], [Accounts].[Purpose], Sum([Account Charges].[Amount]) AS SumOfAmount, Sum([Account Charges].[Minutes]) AS SumOfMinutes, [Account Charges].[Date]
FROM Accounts INNER JOIN [Account Charges] ON [Accounts].[Account #]=[Account Charges].[Account #]
WHERE (([Account Charges].[Date])>=[enter date] And [date]<=DateAdd("m",2,[enter date])))
GROUP BY [Accounts].[CostCenter], [Accounts].[Purpose], [Account Charges].[Date];

in this query i want to display only three months what the user enters from the starting date say user enters 7/1/07 i want it to display only july,aug and sep months, infact i am getting all the months from Jan to Dec.

How can i filter columns to get only the required months.

lee123's Avatar
Site Addict
 
Join Date: Feb 2007
Location: United States
Posts: 532
#2: Nov 7 '07

re: Crosstab query


hi there you could try doing this in the query in the criteria putting this:

Expand|Select|Wrap|Line Numbers
  1. [what date] to [what date]
lee123
Newbie
 
Join Date: Oct 2007
Posts: 9
#3: Nov 7 '07

re: Crosstab query


Hi lee

For which field can i put that criteria, since iam using crosstab query monthly report i gonna show jan to dec what so ever.
lee123's Avatar
Site Addict
 
Join Date: Feb 2007
Location: United States
Posts: 532
#4: Nov 7 '07

re: Crosstab query


what do you have in your crosstab query? whats the (columns) and what is your (row heading)?

lee123
Reply