Calculation in SQL Union query

S

SZ

Hi! I'm using Access 2003.
I have an SQL union query that brings together a table and 2 crosstab
queries, which each have the same type of fields.
So when I bring them together with the union query I have 3 rows -
Population, Calls(type1) and Calls(type2) all with 5 columns which are age
groups - Under 18, 18 - 25, 26 - 39, 40 - 59, Over 60.
What I want to do is put in two new rows, which calculate the calls per
population for each type of call split by age groups, but I can't figure out
how to do it. Any ideas?
 
K

KARL DEWEY

Post the SQL for the union you have.
Post an example of what the output should look like.
 
G

George Nicholson

I don't think you can do what you want in a query. One subset of the Union
(CallsType1) is pretty much blind to the contents of any other subset of the
Union (Population), much like a single record is fairly oblivious to the
existance, much less content, of any prior record.

You *might* be able to base a new query on the Union and get some meaningful
calculations, or just use the Union query to pull together the 3 pieces of
data you need for each group and then do the calculation on a report or
form.
 

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