Combining Access Tables - Identical fields

PghYoPro

New Member
Joined
Dec 9, 2015
Messages
23
Hi all,

I have four tables with identical fields that I would like to combine into one master table. What is the easiest way to do so?

From reading, it seems a UNION ALL might do the trick; not sure what I am doing incorrectly:

Select * from ECP1
Union All

Select * from ECP2
Union All

Select * from ECP3
Union All

Select * from ECP4

I keep getting the error:

"Syntax error in FROM clause"
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I don't do this often but I think the answer is that you can't use wildcard for all fields in a Union query. So
SELECT field1, field2... FROM tblMyTable1
UNION (or UNION ALL)
SELECT field1, field2... FROM tblMyTable2
etc
 
Upvote 0
this works fine for me.


SELECT * from Inventory1
union all
select * from Inventory2
union all
select * from Inventory3
union all
select * from Inventory4


I don't see where you are creating a new master table anywhere, though. In the original post is that the actual query you were using?
 
Upvote 0

Forum statistics

Threads
1,221,547
Messages
6,160,456
Members
451,647
Latest member
Tdeulkar

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