Merge 2-5 Tables into 1

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have mutiple tables that are linked to an Excel file. I would like to be
able to create a query that will combine all of the tables into one. My data
is as follows:

Table 1
Mfg Sep Oct Nov Dec Jan
GM 100 100 100 50 100

Table 2
Mfg Sep Oct Nov Dec Jan
Jag 50 50 25 0 10

I need to create either a table or query to combine the 2 above.
 
You can use a union query to "combine" records from multiple tables into a
single record set.
SELECT Mfg, Sep, Oct, Nov...
FROM Table1
UNION ALL
SELECT Mfg, Sep, Oct, Nov...
FROM Table2;

I would normalize this but I don't know your application as well as you.
 
That sounds like a union query which can only be done in the SQL (Text) window.

SELECT Mfg, Sep, Oct, Nov, Dec, Jan
FROM [Table 1]
UNION ALL
SELECT Mfg, Sep, Oct, Nov, Dec, Jan
FROM [Table 2]
ORDER BY Mfg

Note that the Order by clause is optional, is added after all the unions, and
uses the field names from the first query in the union query.
 
Thanks Duane. That worked!!!

Duane Hookom said:
You can use a union query to "combine" records from multiple tables into a
single record set.
SELECT Mfg, Sep, Oct, Nov...
FROM Table1
UNION ALL
SELECT Mfg, Sep, Oct, Nov...
FROM Table2;

I would normalize this but I don't know your application as well as you.
 
Thanks John. The join worked!

John Spencer said:
That sounds like a union query which can only be done in the SQL (Text) window.

SELECT Mfg, Sep, Oct, Nov, Dec, Jan
FROM [Table 1]
UNION ALL
SELECT Mfg, Sep, Oct, Nov, Dec, Jan
FROM [Table 2]
ORDER BY Mfg

Note that the Order by clause is optional, is added after all the unions, and
uses the field names from the first query in the union query.
I have mutiple tables that are linked to an Excel file. I would like to be
able to create a query that will combine all of the tables into one. My data
is as follows:

Table 1
Mfg Sep Oct Nov Dec Jan
GM 100 100 100 50 100

Table 2
Mfg Sep Oct Nov Dec Jan
Jag 50 50 25 0 10

I need to create either a table or query to combine the 2 above.
 
Back
Top