If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Query set-up help
I need some help. I have multiple tables that I want to combine. All of the
tables have the exact same setup. Let's say there are 2 fields, ID and Amount and I have 3 tables (both are more in reality). **Table 1** a 8 b 1.965 c 1 **Table 2** d 1 a 16 c 2 **Table 3** c 3 e 10567 d 10 etc I want to create a query so that I get table that looks like this: a 24 b 1.965 c 6 d 11 e 10567 So I want to combine ID's if they appear in multiple tables, and add "Amounts" for a specific ID across tables. An ID may or may not be in every table. Do I use a union query for this? How does that deal with duplicates and adding? I hope this is possible....thanks! |
#2
|
|||
|
|||
Query set-up help
Use two queries - Union All and then Totals queries.
-- KARL DEWEY Build a little - Test a little "Michelle" wrote: I need some help. I have multiple tables that I want to combine. All of the tables have the exact same setup. Let's say there are 2 fields, ID and Amount and I have 3 tables (both are more in reality). **Table 1** a 8 b 1.965 c 1 **Table 2** d 1 a 16 c 2 **Table 3** c 3 e 10567 d 10 etc I want to create a query so that I get table that looks like this: a 24 b 1.965 c 6 d 11 e 10567 So I want to combine ID's if they appear in multiple tables, and add "Amounts" for a specific ID across tables. An ID may or may not be in every table. Do I use a union query for this? How does that deal with duplicates and adding? I hope this is possible....thanks! |
Thread Tools | |
Display Modes | |
|
|