Total info by state

G

Guest

I currenlty have 5 queries that total information by state. I am trying to
put them togther in one query. I only want to display the states that have
information in either of the 5 queries with the totals of all 5 queries.Some
of the queries will have null values for some of the states that the other
will have a number. How do I do this????
 
J

John Vinson

I currenlty have 5 queries that total information by state. I am trying to
put them togther in one query. I only want to display the states that have
information in either of the 5 queries with the totals of all 5 queries.Some
of the queries will have null values for some of the states that the other
will have a number. How do I do this????

Probably using either an outer join (select the join line and choose
option 2 or 3 as appropriate) or with a union query; since I have no
idea how the queries are structured or how you want to combine them I
really can't say which.

Why not create one query to do the summing for all five? Group By the
state and sum the values...


John W. Vinson[MVP]
 
G

Guest

I tried to pull all the the queries into one query with a table with the
states and join them by the states table abbreviation using 1 option. I got
nothing. The only thing that I could figure was that some of the queries
totals had nulls for some of the states while others had totals. I tried the
sum total also, it gave me nothing. I did try your suggestion of using the 2
based on the Table and I got all the states with the numbers for each in
queries numbers in each state. However, when I try 3 option it told me I
could not do this type of join.

What I want is just the states that have infomation in either of the 5 totals.
 
G

Guest

I was able to get the information to come out like I wanted it to by running
another query after I pull the information for all the states. I made it put
zeros were there was not info so I was able to add the five totals together
and tell them I did not want any thing equal to zero.


I appreciate the help. I had forgotten about setting the properties of
joining.

Thanks.
 

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