Modify query

How can I modify query to make table from union query.

I should use only 1 query (I know how to do it in 2 queries, I need to do it in 1 query)

SELECT [Insurance Payees].*
FROM [Insurance Payees]
UNION SELECT [Tax Payees].*
FROM [Tax Payees];
maximyshkaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
I don't think you can.  You need to save the UNION query as a named query, then create a MakeTable query from that ...

mx
0
 
maximyshkaAuthor Commented:
That I know myself.  So Answer is not possible?
0
 
answer_dudeCommented:
This should work:
SELECT MyUnion.* INTO zzMyNewTable
FROM 
(SELECT [Insurance Payees].*
FROM [Insurance Payees]
UNION SELECT [Tax Payees].*
FROM [Tax Payees]) as MyUnion

Open in new window

0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
That does seem to work, technically not a UNION query by itself.  But it is one query.

mx
0
 
answer_dudeCommented:
It is a make table query based on a union query - done in one statement and saved as one Query object in Access - which answers the question asked.
0
 
answer_dudeCommented:
It is a make table query based on a union query - done in one statement and saved as one Query object in Access - which answers the question asked.
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
I see that ... and it's a cool solution.

mx
0
 
answer_dudeCommented:
It is a make table query based on a union query - done in one statement and saved as one Query object in Access - which answers the question asked.
0
 
answer_dudeCommented:
apologies for the annoying-multiple posts...  made update from phone and it posted several times

:-(

won't do that again...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.