View Full Version : Merging tables with unmatched keys


Hellmonkey
11-12-2007, 09:24 AM
Hi all, im hoping someone can help. This is the problem.

I have 3 tables that have tax payer information for 1 year broken up into 4 months, 1 table for each 4 month chunk. all 3 tables mostly have the same taxpayers, but each table has payers that are not in 1 or both of the other tables. each table has a 2 part primary key, the business number is the first part, and branch number for businesses with chains. the next 4 fields are each month of taxes paid. heres the design of each table.

Q1
ID 1 ID2 Data1 Data2 Data3
1 0
2 0
3 1
4 0
5 0

Q2
ID1 ID2 Data1 Data2 Data3
2 0
4 0
6 1
8 1
Q3
3 1 Data1 Data2 Data3
4 0
6 1
8 1
9 0
10 0

is there an easy way to merge all of this data into 1 table easily. ive tried using make table or append queries, but it only addes the information where the IDs are in each table. this leaves out the ids that are in only 1 or 2 tables.

if you need me to clarify or explain anything else, please let me know. i can post screenies or the design, but obviously, not the data.

RuralGuy
11-12-2007, 09:36 AM
Have you tried playing with the Find Unmatched Query Wizard?

Hellmonkey
11-12-2007, 10:26 AM
yes, thats how i found out that some IDs are not in all the tables.

RuralGuy
11-12-2007, 10:30 AM
You should be able to Append the results of the Unmatched query to your table. Does that not work?

Hellmonkey
11-12-2007, 10:44 AM
ill give that a try when i get a chance, the help desk is swamped :(