Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Union query not counting duplicates 1

Status
Not open for further replies.

DoctorJDM

Technical User
Apr 15, 2007
60
GB
Hi

Have this union query to list all items making up a Job

SELECT QuoteRef,Description,Cost,Type
FRoM qryActualComponents
UNION SELECT QuoteRef,Description,Cost,Type
FRoM qryActualHours
UNION SELECT QuoteRef,Description,Cost,Type
FRoM qryActualOtherItems
UNION SELECT QuoteRef,Description,Cost,Type
FRoM qryActualSheetMaterial
UNION SELECT QuoteRef,Description,Cost,Type
FRoM qryActualSubconCosts
UNION SELECT QuoteRef,Description,Cost,Type
FRoM qryActualTimber;

Am finding that if one of the queries, eg qryActualSheetMaterial contains two identical entries, the union query just includes one of them. It's as if it only counts unique items. Any thoughts?


 
Use UNION ALL ...

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top