Prevent Duplicates from Union Query

P

PPCO

I have a simple Union Query, but it returns duplicates from my 2 tables. I am
using just the Union Select not Union All Select. Is there an easy way to
prevent the duplicates?

SQL:

Select Customerreffullname as customer, RequestDate as
RequestDateorNumberofDayssincelastpickup, RequestType
from qrypickuprequestMMCO

UNION select Customer, Dayssincelastpickup as
RequestDateorNumberofDayssincelastpickup, RequestType
from qryMutualInvoiceOrderLineLastPickupPastDeadline;
 
J

Jerry Whittle

A UNION query can not return duplicate records. Something in the record MUST
be different for them to be returned. So you need to define what you consider
a duplicate. Is it one field or a combination of more than one field? Which
fields?
 

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