Solved

Modify query

Posted on 2011-03-21
9
312 Views
Last Modified: 2012-08-13
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];
0
Comment
Question by:maximyshka
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 75
ID: 35183856
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
 

Author Comment

by:maximyshka
ID: 35183936
That I know myself.  So Answer is not possible?
0
 
LVL 10

Accepted Solution

by:
answer_dude earned 500 total points
ID: 35183951
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 75
ID: 35184132
That does seem to work, technically not a UNION query by itself.  But it is one query.

mx
0
 
LVL 10

Expert Comment

by:answer_dude
ID: 35184270
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
 
LVL 10

Expert Comment

by:answer_dude
ID: 35184278
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
 
LVL 75
ID: 35184285
I see that ... and it's a cool solution.

mx
0
 
LVL 10

Expert Comment

by:answer_dude
ID: 35184291
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
 
LVL 10

Expert Comment

by:answer_dude
ID: 35184368
apologies for the annoying-multiple posts...  made update from phone and it posted several times

:-(

won't do that again...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question