Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding up two tables into one

Status
Not open for further replies.

marko23

MIS
Mar 27, 2006
5
GB
Hello Guys

This might sound like an easy qestion but i just cant do it, and need someones help!

I got two Access tables that are set out exactly the same, and im trying too add the figures in both tables together, too produce the results in another table.

Can anyone help me on how too do this

Thanks

Mark
 
Any chance you could elaborate on what you want to do ?
I suggest you to carefully read the second FAQ in my sig below.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yes i can ellaborate!

I have two Access tables that are set out exactly the same, same fields etc

they hold some call centre statistics in both tables.

What i want too do is add together the statistics in both tables in display the results in a new table.

Whethere this is done by query im not sure, this is where i need your help
 
Create an UNION query to merge the data from the two tables, then create an AGGREGATE query based on the above query.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Could you give me an example of such a union query??
 
add together" may mean

"place all records from both tables into one table or query"

or it may mean

"compute sums of matching fields in both tables"

If it's the first one then (with credit to PHV)
Code:
Select * From tbl1
UNION
Select * From tbl2

and if its the second

Code:
Select A.fld1, (A.fld2+B.fld2) As [SUM2}, ...

From tbl1 A INNER JOIN tbl2 B
     ON A.fld1 = B.fld1
 
Could you give me an example of such a union query??

Could you give us some examples of your data and examples of your expected results?



Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top