Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help please! Multiple tables into one?

Status
Not open for further replies.

Walshie1987

Technical User
Oct 5, 2006
100
Hi, I have a database with 12 linked spreasheets containing info (Jan - Dec). Each one contains data in the same layout, same headers etc.

I want to consolidate all the info onto one sheet automatically, without having to copy and paste the data in excel. I want to do this so I can run queries on all of the data for the year.

Any ideas?

Cheers
Chris
 
Write a UNION query:

SELECT "JAN" AS DataMonth, Table1.*
FROM Table1 UNION Select "FEB",Table2.* from Table2;

etc etc for remainding tables

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
In Excel, have you looked at Consolidation(DATA -Consolidate)?
 
Hi thanks for the replies, I looked at the excel condolidate option but have decided to go for the "UNION ALL" option

Thanks again

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top