Corsstab Queries

  • Thread starter Thread starter Zj
  • Start date Start date
Z

Zj

i have a corsstab query based on a Union query, both queries are ORDER BY ID.

the data are displaied from Union query is in 'ID' order, but not in order
from Corsstab query.

Why?

your help is much appreciated.
 
It may be an optimizer short-cut. If you don't specify an order by in the
final query, the sub-query don't have to spent time in ordering their data,
uselessly, as the end result is concerned. Have you tried to add the order
by clause in the crosstab (and I assume the fields you order by are not the
ones created, horizontally, but are rather the fields you GROUP BY,
vertically).


Vanderghast, Access MVP
 
In addition, if the ID field is numeric, it may get sorted in text order like:
1
10
11
12
2
20
21
....
Since you haven't provide either sample data or your SQL or which order
(field values in a row heading or the derived columns) we can't be of much
greater assistance.
 
Back
Top