Combining Tables

  • Thread starter Thread starter Guest
  • Start date Start date
It is completely dependent upon the structure of the multiple tables and the
single table. Can you tell us more information?
 
Is there an easy way to combine multiple tables into one single table?

Yes. It may be a Bad Thing to Do or a very good idea, depending.

For a more detailed answer post a more detailed question.

John W. Vinson [MVP]
 
I have 8 tables...they all include the same number of columns and the column
headers are all the same. The reason I have 8 tables is because the access
spreadsheet that I exported the tables from was not large enought to hold all
of the records. I have an avg of 17,000 records in each table. I want all
of the data to be in one single table. I hope I explained this well enough.
 
INSERT INTO MyTable1 (MyField1, .., MyFieldN)
SELECT MyField1,..,MyFieldN FROM MyTable2
UNION ALL
SELECT MyField1,..,MyFieldN FROM MyTable3
UNION ALL
SELECT MyField1,..,MyFieldN FROM MyTable4

etc

You may want to use a fresh table or use one of the existing ones

hth

Pieter
 
Thank you.

Pieter Wijnen said:
INSERT INTO MyTable1 (MyField1, .., MyFieldN)
SELECT MyField1,..,MyFieldN FROM MyTable2
UNION ALL
SELECT MyField1,..,MyFieldN FROM MyTable3
UNION ALL
SELECT MyField1,..,MyFieldN FROM MyTable4

etc

You may want to use a fresh table or use one of the existing ones

hth

Pieter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top