How do I save/overwrite a SQL Union to a table?

Mike1sMike

New member
Local time
Today, 16:37
Joined
Apr 24, 2020
Messages
16
This has to be easier than I am making it. This union works fine but I am lost as to how to save the unions to a new table, say eoy2020. Thank you to anyone!

SELECT *
FROM eom0920 WHERE (((eom0920.[Row]) Is Not Null))

UNION ALL SELECT *
FROM eom1020 WHERE (((eom1020.[Row]) Is Not Null))

UNION ALL SELECT *
FROM eom1120 WHERE (((eom1120.[Row]) Is Not Null));
 
Hmm, you could try creating a Make-Table query based on your UNION query. Why?
 
Hmm, you could try creating a Make-Table query based on your UNION query. Why?
Thanks, you are always my hero. An Excel sheet needs to link to this for now ( I know I know but don't have time to migrate everything into Access) so I need a table for now. I don't know the SQL syntax to turn the above into a make-table. I think I am being dumb, however nothing is obvious to the uninformed....
 
Thanks, you are always my hero. An Excel sheet needs to link to this for now ( I know I know but don't have time to migrate everything into Access) so I need a table for now. I don't know the SQL syntax to turn the above into a make-table. I think I am being dumb, however nothing is obvious to the uninformed....
Easiest way would be to save your UNION query and let's say you called it qryUNION. Then, create another query with this SQL.
SQL:
SELECT * INTO NewTableName FROM qryUNION
Hope that helps...
 
Whenever you don't know the SQL Syntax, use the QBE to build your query.
 

Users who are viewing this thread

Back
Top Bottom