Union Query to append table?

  • Thread starter hawornk via AccessMonster.com
  • Start date
H

hawornk via AccessMonster.com

Here is the SQL from my Union Query (yes, I know the names for some of the
fields aren't the greatest, but they are what they are, and that's not part
of my question).

How do I turn this into an append query?

SELECT[hc query].[include?],[hc query].[question],[hc query].[consumer answer]
,[hc query].[consumer author],[hc query].[consumer answer date],[hc query].
[hcp answer],[hc query].[hcp author],[hc query].[hcp answer date],[hc query].
[View consumer],[hc query].[view HCP],[hc query].[expr1],[hc query].[expr2],
[hc query].[expr3],[hc query].[expr4],[hc query].[expr5],[hc query].
[citation1],[hc query].[citation2],[hc query].[citation3],[hc query].
[citation4],[hc query].[citation5],[hc query].[citation6],[hc query].
[citation7],[hc query].[citation8]
from [hc query]
UNION ALL SELECT [infant query].[include?], [infant query].[question],
[infant query].[consumer answer], [infant query].[consumer author], [infant
query].[consumer answer date], [infant query].[hcp answer], [infant query].
[hcp author], [infant query].[hcp answer date], [Infant query].[View consumer]
, [Infant query].[view HCP], [infant query].[expr1], [infant query].[expr2],
[infant query].[expr3],[infant query].[expr4],[infant query].[expr5],[infant
query].[citation1],[infant query].[citation2],[infant query].[citation3],
[infant query].[citation4],[infant query].[citation5],[infant query].
[citation6],[infant query].[citation7],[infant query].[citation8]
from [infant query];
 
M

Michel Walsh

Write a new query that will append the data from ... this query (use it as
if it was a table)... to the table you want append the data to.


Vanderghast, Access MVP
 
J

John Spencer

Answered above.

Save this query as qUnion

Now use this query as the source of an append query.

Open a new query
Select the Union query as the source
Select Query: Append from the Menu
Set up the query to append the fields to the proper fields in the target
table.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top