var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Merge Tables
I'm new to SQL.
Is it possible for SQL to input 2 tables (or more) and assuming that each table contains 10 rows and the data formats are identical, merge into a new table with 20 rows.
Thank You in Advance for Your Help,
Re: Merge Tables
insert into table3 ( a, b, c )
select a, b, c from table1
select a, b, c from table2;
With UNION ALL, any records common to table1 and table2 will be duplicated; with UNION they will not.
That's exactly what I was looking for.
That did not quite work, maybe because I'm working in MS Access, but it got me going in the right direction.
For some reason it did not like unioning two tables and creating a third, I kept getting errors when I added the INSERT INTO.
Here's what I ended up doing, and it works perfectly!
Query1 is a Union Query
select table1.* FROM table1
UNION ALL select table2.* FROM table2;
Query2 is a Make Table Query
SELECT Query1.*, * INTO Table3
ORDER BY a , b, c;
By running Query2, Query1 is run to get the unioned Table1 and TABLE2. The tables are formatted and sorted int Table3.
Thanks Tony, you gave me the clues I needed!