Full Version: Appending many tables to one table
UtterAccess Discussion Forums > Microsoft® Access > Access Tables + Relationships
12345678
Hello,

I have around 120 tables in my database. Monthly data for 10 years period . The tables have the same data type and number of columns(more than 20 columns). I want to combine these tables in 1 table. I am wondering what is the easiest way to do so.
I hope it is not by appending each table individually.
Best wishes
dannyseager
how about making a union query, quite simply with a bit of copy and pasting and then copy them to your new table....

create a query and add the SQL code like this.

SELECT * FROM [JAN1994]
UNION
SELECT * FROM [FEB1994]
UNION
SELECT * FROM [MAR1994];

etc....

Also it's good to see you're doing this as it's the right way to go to normalise the DB frown.gif
12345678
I have a few questions regarding union (i have never used it before)

1) Does SELECT * FROM [JAN1994] for example lead to the selection of all the columns in that table?
2) Do I need to write after that Copy * FROM [JAN1994] and Paste to [New table]?

Sorry about this and thanks again for your reply
Best wishes
12345678
the reason why I am asking is that I am receiving an error
Syntax error in query. Incomplete query clause
the codes I am writing are like this:
SELECT * FROM [Y0185]
UNION
SELECT * FROM [Y0186]
UNION
SELECT * FROM [Y0187]
UNION
SELECT * FROM [Y0188]
UNION
SELECT * FROM [Y0189]
UNION
etc...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.