union query transposes values

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

I have a union query that puts together two select queries I'll call A
and B. The query runs, no errors are reported. However, the data in
the second and third fields of query B are switched. So now one column
that should only contain a summed total contains a ratio, and a column
with ratios has the summed total.

Why this is happening?
 
I have a union query that puts together two select queries I'll call A
and B. The query runs, no errors are reported. However, the data in
the second and third fields of query B are switched. So now one column
that should only contain a summed total contains a ratio, and a column
with ratios has the summed total.

Why this is happening?

Care to post the SQL of the query?

Something's wrong with the query, clearly. We cannot see it to help
you figure out what that might be.

John W. Vinson[MVP]
 
I suspect that the cross-tab query is not returning the columns in the order you
expect it to. Have you specified the names of the pivot columns?
 
Aha. Yes, it was the cross-tab query that was accidentally arranged
out of order. I fixed the order and now the union query sorts
properly. Thank you.
 
Back
Top