adding two columns

bauer

Registered User.
Local time
Today, 11:14
Joined
Aug 23, 2001
Messages
77
Hi all!

I'm trying to add together one column from four queries that are the same. They all have an id, and are all a count from another table.
What I want to do now, is add up the count of the four tables.
I've tried a union, but I didn't get a total of the count (Though I'm not too familar with unions, so I could've done something wrong).
Thank you all for your help

bauer
 
Thank you for your reply, however, when I tried the union query, it gave me only one instance of each type of the field that I wanted to group by, and not a total of the other column, but just one instance of it.

In the end, what I did was I made a table of my two feilds, and did an append query for each of my four queries, and then did a query on that one to get the total.

I'm not sure if this is the most effiecient way (probably not), but it works. The only problem I now have, which is just more annoying that anything else, is that I have to call all of these queries each time I want to get an accurate count, with of coures deleting the original contents each time. However, it works, so why not.
 

Users who are viewing this thread

Back
Top Bottom