Duplicates don't show up in my Union Query

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

Guest

Below is the verbage on my union query. Everything works okay, except it suppresses a duplicate record if everything across the record is exactly the same. I don't want it to do that. Can someone please tell me if there is something I can add to this so that won't happen

Thanks!

SELECT [Master.Company],[Master.FirstName],[Master.LastName],[Master.Address],[Master.Address2],[Master.City],[Master.State],[Master.Zip
FROM [qry TW Subscribers (TW Comp and TW Paid Only)
UNION SELECT [Agency],[AgFirstName],[AgLastName],[AgAddress],[AgAddress2],[AgCity],[AgState],[AgZip
FROM [qry TW Subscribers (Agencies Only)]
 
Use
UNION ALL
instead of
UNION

It also often runs much faster!

(david)

Teri said:
Below is the verbage on my union query. Everything works okay, except it
suppresses a duplicate record if everything across the record is exactly the
same. I don't want it to do that. Can someone please tell me if there is
something I can add to this so that won't happen?
Thanks!!

SELECT [Master.Company],[Master.FirstName],[Master.LastName],[Master.Address],[Mast
er.Address2],[Master.City],[Master.State],[Master.Zip]
FROM [qry TW Subscribers (TW Comp and TW Paid Only)]
UNION SELECT [Agency],[AgFirstName],[AgLastName],[AgAddress],[AgAddress2],[AgCity],[AgSta
te],[AgZip]
FROM [qry TW Subscribers (Agencies Only)];
 
Back
Top