Union Query to a Table

  • Thread starter Thread starter miss_mas
  • Start date Start date
M

miss_mas

I created a union query. How do I get the output to go to a new table?
Do I have to CREATE TABLE then use all the INSERT INTO functions or is there
an easier way to do this? I am creating a new table because I need another
database to be able to link to this table.
 
miss_mas said:
I created a union query. How do I get the output to go to a new
table?
Do I have to CREATE TABLE then use all the INSERT INTO functions or
is there an easier way to do this? I am creating a new table because
I need another database to be able to link to this table.

That's probably the appropriate way if you wish to have keys (indexes),
validation rules, etc.

If you simply wish to have a heap of data, then this should work (it works
in SQL Server anyways):

select <column_list> into newtable from ...
union
select <column_list> from ...
etc.
 
Create the table first with the correct field types and lengths. Make Table
queries make assumptions and use defaults that waste memory space.
Create an append query that appends the output of your Union query to the
new table.
 
Back
Top