I am using a cartesian query to create multiple copies of a record to use for printing labels.
Here's my query that produces the cartesian result:
This works just fine in creating the desired result - EXCEPT I don't get all the records.
When I remove the 'cartesian table', and right join everything, then I get the correct results. If I keep everything as-is and reintroduce the cartesian table, then I get an error about there being an ambiguous outer join.
I searched but I couldn't figure this out. TIA
Here's my query that produces the cartesian result:
SELECT tblCount.CountID, tblDeliveryOrders.DeliveryOrderNum, CurrentCY.Deliveryorderlineitemnum, CurrentCY.Quant, CurrentCY.UOM1, tblContainerSizeCodes.SizeCode, tblContainerTypeCodes.TypeCode, CurrentCY.WasteDescription, tblEtidDodaac.EtidDodaac, CurrentCY.ETIDDocNum, CurrentCY.Pounds, tblEPAWasteCodes.[EPAWasteCodes(1B)]
FROM tblCount, tblDeliveryOrders INNER JOIN (tblEtidDodaac INNER JOIN (tblContainerSizeCodes INNER JOIN (tblContainerTypeCodes INNER JOIN (tblEPAWasteCodes INNER JOIN CurrentCY ON tblEPAWasteCodes.EpaWasteCodesIDPK = CurrentCY.[EPAWasteCodes(1B)IDFK]) ON tblContainerTypeCodes.ContainerTypeCodesIDPK = CurrentCY.ContainerTypeCodeIDFK) ON tblContainerSizeCodes.ContainerSizeCodesIDPK = CurrentCY.ContainerSizeCodeIDFK) ON tblEtidDodaac.EtidDodaacIDPK = CurrentCY.EtidDodaacIDFK) ON tblDeliveryOrders.DoIDPK = CurrentCY.DeliveryOrderNumberIDFK
WHERE (((tblCount.CountID)<=[quant]) AND ((tblDeliveryOrders.DeliveryOrderNum)=[which delivery order]));
This works just fine in creating the desired result - EXCEPT I don't get all the records.
When I remove the 'cartesian table', and right join everything, then I get the correct results. If I keep everything as-is and reintroduce the cartesian table, then I get an error about there being an ambiguous outer join.
I searched but I couldn't figure this out. TIA