Select vs crosstab query - different result

  • Thread starter Crosstab report for cross-month data
  • Start date
C

Crosstab report for cross-month data

I got a question...for my report..Pls help.

report consists of a/c no, main a/c, balance etc....and month (which include
past 25 months).

When it is in select query, data display is correct. However, when it is
dsplayed in crosstab query, 3 month data is not correct. Is there any limit
on the no. of columns when creating a crosstab query?

Below is the SQL view for crosstab query...

TRANSFORM Sum([total-update-mapping-24 months].[Balance as of Jun09]) AS
[SumOfBalance as of Jun09]
SELECT [total-update-mapping-24 months].Pointer, [total-update-mapping-24
months].[main a/c], [total-update-mapping-24 months].[main a/c name],
[total-update-mapping-24 months].[sub a/c]
FROM [total-update-mapping-24 months]
WHERE ((([total-update-mapping-24 months].[sub a/c])="99285"))
GROUP BY [total-update-mapping-24 months].Pointer, [total-update-mapping-24
months].[main a/c], [total-update-mapping-24 months].[main a/c name],
[total-update-mapping-24 months].[sub a/c]
PIVOT [total-update-mapping-24 months].month;

Thanks very help!!!
 
D

Duane Hookom

You are pivoting on month which probably results in 12 columns at the most
since there are only 12 months in a year. Since you didn't provide your data
types or sample records, it is very difficult to provide much more assistance.

There is a limit to the number of columns that get generated but I believe
it is the same number as fields in a table or query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top