Merging Tables

gregw

New Member
Joined
Jun 5, 2002
Messages
21
I am using access 97 and I have two tables T1 & T2 I am joining these using a claim number field. In the join property I can select claims from T1 that match T2 or all claim in T1 plus matched one from T2 or all from T2 and matched from T1. Ideally I want all claims from both tables (but zero duplicates). but I can't work out how to do this unless I use two queries (all T1 and matched from T2 (make a table T3) then another query where I select all from T2 that are not in T1 and append that to T3). If someone has a quicker one step query to merge two tables I would love to hear about it.

Thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Without seeing the fields from each table, would this help:-

SELECT * FROM T1 UNION SELECT * FROM T2

This assumes that the fields in T1 are the same as T2. By default, UNION queries will only output unique records.

Please let me know if this isn't what you need.
 
Upvote 0
Using this code I can't see the query in Design View any more is it still possible to see the query in Design View? However it does seem to do the trick.
 
Upvote 0
I create my queries in design mode. I am not flash using sql. How would I go about displaying one record for each claim and then one other field for each table so basically

T1
claim amt1
1 10
2 20
3 30

T2
claim amt2
2 15
5 25
7 35

Combined (what I want)
claim amt2 amt1
2 15 20
5 25
7 35
1 10
3 30
 
Upvote 0

Forum statistics

Threads
1,221,501
Messages
6,160,177
Members
451,629
Latest member
MNexcelguy19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top