Corsstab Queries

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.
 
V

vanderghast

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
 
D

Duane Hookom

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.
 

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