Combining duplicates in different queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have two queries with the same Part No. One query is what the dealer
ordered and the other is what the dealer told us he sold. How do I make a
query that puts the same part no's from the two together and then give me the
final quantity of what he has left of those parts?

Is this possible thanks,

Dustin
 
it's called a union query


select firstname from employees
union
select firstname from customers


this would get rid of the duplicates
 
Hi,

I have two queries with the same Part No. One query is what the dealer
ordered and the other is what the dealer told us he sold. How do I make a
query that puts the same part no's from the two together and then give me the
final quantity of what he has left of those parts?

Is this possible thanks,

Dustin

I'm sure that it is, but since you haven't given any indication of the nature
of these queries or how this "final quantity" might be calculated, I can't
really say how.

Try creating a new query joining these two queries on Part No and do an
appropriate calculation. If each query has only one record for each part no
this should work. You may need to use a Left Outer Join (select the join line
and choose the option "show all records in Ordered and matching records in
Sold") if you might have some parts where there were orders but no sales.

John W. Vinson [MVP]
 

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

Similar Threads


Back
Top