Error 3205 - Too Many Crosstab Column Headers (300)

  • Thread starter Thread starter NFL
  • Start date Start date
N

NFL

I have a query that worked fine for a while until now. Error #:3205 Too many
crosstab column headers (300). How can I fix this error? Thank you!

TRANSFORM Count(MainTable.CSENO) AS CountOfCSENO
SELECT MainTable.DocketDate, MainTable.Type, Count(MainTable.CSENO) AS
[Total Of CSENO]
FROM MainTable
WHERE (((MainTable.DocketDate) Between
DateSerial(Year(Date()),Month(Date()),1) And
DateSerial(Year(Date()),Month(Date())+1,0)))
GROUP BY MainTable.DocketDate, MainTable.Type
PIVOT MainTable.Autonumber;
 
How can I fix this error?
Change the pivot. Autonumbers are unique and you will have one for each
record and therefore your Count(MainTable.CSENO) will mean nothing as it will
always be 1.

Your query would result in this --
1 2 3 4 5
1/2/2010 A 1
1/2/2010 B 1
1/4/2010 A 1
2/5/2010 X 1
4/1/2010 Y 1

Post sample data and how you want the results to look from that sample.
 
I have a query that worked fine for a while until now. Error #:3205 Too many
crosstab column headers (300). How can I fix this error? Thank you!

TRANSFORM Count(MainTable.CSENO) AS CountOfCSENO
SELECT MainTable.DocketDate, MainTable.Type, Count(MainTable.CSENO) AS
[Total Of CSENO]
FROM MainTable
WHERE (((MainTable.DocketDate) Between
DateSerial(Year(Date()),Month(Date()),1) And
DateSerial(Year(Date()),Month(Date())+1,0)))
GROUP BY MainTable.DocketDate, MainTable.Type
PIVOT MainTable.Autonumber;

You're limited to 255 fields (columns) in any query; there's no way to get
around this.

Could you explain what you want this query to do? It looks like you'll be
viewing or printing a screen with 300 columns of 1 or 0 - doesn't sound
terribly useful or informative! What real-life task is this query intended to
support? Perhaps there's a way other than a monstrous crosstab.
 
Back
Top