append tables

  • Thread starter Thread starter gregg
  • Start date Start date
G

gregg

is it possible to append several identically formatted
tables into one table? The intended result would be a
single table with all records from several tables added to
one table. I tried an append query but get a "duplicate
output destination 'ID'" message. ID is a field in all of
the tables to be appended. What's the problem? I can
accomplish an append manually, copy and paste from all
tables into one existing table but prefer an automated
process where i can run the append query from a macro.
 
Post the SQL of the append query that you've tried to use. What you want to
do should be relatively easy to do.
 
is it possible to append several identically formatted
tables into one table? The intended result would be a
single table with all records from several tables added to
one table. I tried an append query but get a "duplicate
output destination 'ID'" message. ID is a field in all of
the tables to be appended. What's the problem? I can
accomplish an append manually, copy and paste from all
tables into one existing table but prefer an automated
process where i can run the append query from a macro.

It sounds like you're trying to join the tables. You'll need to either
run several Append queries, one for each table, or use a UNION query
as the source of the Append query to do it all in one shot. Create a
new Query based on one of the tables, and go into SQL view; edit the
SQL text to make as many copies of the query as you have tables, with
the word UNION in between; edit the tablenames to cover all the
tables: e.g.

SELECT table1.this, table1.that, table1.theother
FROM Table1
UNION
SELECT table2.this, table2.that, table2.theother
FROM Table2
UNION
SELECT table3.this, table3.that, table3.theother
FROM Table3
<etc>

Save this query and then create an Append query based on it.
 
Back
Top