SELECT TblUnionCodes.Capcode, Count(QryLongModelDescEvents.CapCode) AS LongModelDesc, Count(QryManfEvents.CapCode) AS Manf, Count(QryNomEvents.CapCode) AS Nom, Count(QrySeatsEvents.CapCode) AS Seats, Count(QryShortModelDescEvents.CapCode) AS ShortModelDesc, Count(QryTransmissionEvents.CapCode) AS Transmission, Count(QryValvesEvents.CapCode) AS Valves, Count(QryWBaseTypeEvents.CapCode) AS WBaseType, IIf(Count([QryLongModelDescEvents].[capcode])>0,"1",0) & IIf(Count([QryManfEvents].[capcode])>0,"1",0) & IIf(Count([QryNomEvents].[capcode])>0,"1",0) & IIf(Count([QrySeatsEvents].[capcode])>0,"1",0) & IIf(Count([QryShortModelDescEvents].[capcode])>0,"1",0) & IIf(Count([QryTransmissionEvents].[capcode])>0,"1",0) & IIf(Count([QryValvesEvents].[capcode])>0,"1",0) & IIf(Count([QryWBaseTypeEvents].[capcode])>0,"1",0) AS ResultString
FROM (((((((TblUnionCodes LEFT JOIN QryLongModelDescEvents ON TblUnionCodes.Capcode = QryLongModelDescEvents.CapCode) LEFT JOIN QryManfEvents ON TblUnionCodes.Capcode = QryManfEvents.CapCode) LEFT JOIN QryNomEvents ON TblUnionCodes.Capcode = QryNomEvents.CapCode) LEFT JOIN QrySeatsEvents ON TblUnionCodes.Capcode = QrySeatsEvents.CapCode) LEFT JOIN QryShortModelDescEvents ON TblUnionCodes.Capcode = QryShortModelDescEvents.CapCode) LEFT JOIN QryTransmissionEvents ON TblUnionCodes.Capcode = QryTransmissionEvents.CapCode) LEFT JOIN QryValvesEvents ON TblUnionCodes.Capcode = QryValvesEvents.CapCode) LEFT JOIN QryWBaseTypeEvents ON TblUnionCodes.Capcode = QryWBaseTypeEvents.CapCode
GROUP BY TblUnionCodes.Capcode
HAVING (((Count(QryLongModelDescEvents.CapCode))>0)) OR (((Count(QryManfEvents.CapCode))>0)) OR (((Count(QryNomEvents.CapCode))>0)) OR (((Count(QrySeatsEvents.CapCode))>0)) OR (((Count(QryShortModelDescEvents.CapCode))>0)) OR (((Count(QryTransmissionEvents.CapCode))>0)) OR (((Count(QryValvesEvents.CapCode))>0)) OR (((Count(QryWBaseTypeEvents.CapCode))>0))
ORDER BY IIf(Count([QryLongModelDescEvents].[capcode])>0,"1",0) & IIf(Count([QryManfEvents].[capcode])>0,"1",0) & IIf(Count([QryNomEvents].[capcode])>0,"1",0) & IIf(Count([QrySeatsEvents].[capcode])>0,"1",0) & IIf(Count([QryShortModelDescEvents].[capcode])>0,"1",0) & IIf(Count([QryTransmissionEvents].[capcode])>0,"1",0) & IIf(Count([QryValvesEvents].[capcode])>0,"1",0) & IIf(Count([QryWBaseTypeEvents].[capcode])>0,"1",0) DESC;
ee.PNG
Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Expert of the Year award recognizes an expert who helped improve Experts Exchange in the past year through high levels of contributions and participation on site. This award is given to the expert who has achieved the highest levels of participation, while maintaining quality contributions and professionalism.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.