Combine Results from 2 Queries

P

Parker

I have two queries based on seperate tables that result the following info:
Query #1 - PartNo; PONumber
Query #2 - PartNoRec; PONo

I want to combine these results into one listing of 'PartNo' and 'PONo', but
I can't get it to work. I either get multiple or missing entries. I would
like it to include all records from both queries, but no duplicates.

Basically, I have a 'Parts On Order' table and a 'Parts sent for
Refinishing' table and I want to have a report that shows all of the open
items together... Is there a better way to go about this?

Thanks in advance for any help!

Parker
 
M

Michel Walsh

Hi,


SELECT PartNo, PONumber FROM query1
UNION
SELECT PartNoRec, PONo FROM query


should do. UNION, by default, when not using ALL (as in UNION ALL )
removes duplicated rows



Hoping it may help
Vanderghast, Access MVP
 
P

Parker

Works great! I'm not very familiar with the SQL stuff, so that would have
taken me forever to figure out...

Thank you so much.

Parker
 

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