Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Modify query

Posted on 2011-03-21
9
Medium Priority
?
316 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
  • 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 2000 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
Technology Partners: 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

963 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