Combine Multiple Queries

  • Thread starter Thread starter Bill Sturdevant
  • Start date Start date
B

Bill Sturdevant

I have table A which contains one set of records. I have
a query that pulls the records from Table A. The query
produces 100 records.

I also have table B which contains different fields than
Table A. I have a query that pulls records from Table B
and uses specific fields to create dummy records that look
just like those from Table A in format but that only have
a couple of fields filled in. The query produces 50
records.

The problem: I need to merge the records from Query
A/Table A with the manufactured records from Query B/Table
B for a total of 150 records BEFORE I export them to Excel.

How do I create a 3rd query that merges the results of
Query A and Query B. I am drawing a complete blank on
this one!
 
Create a third query that unions the other two.

SELECT * FROM qryA
UNION ALL
SELECT * FROM qryB

*Note: All of the fields need to be in the same sequence
in the two queries, and the field types for the result set
of both queries must be identical.
 

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

Back
Top