union query transposes values

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?
 
J

John Vinson

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]
 
J

John Spencer

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?
 
E

Eric

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.
 

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