FoxProProgrammer
Programmer
Given the following Query:
Here is each Query by itself:
qry_convert_allJobs
qry_convert_parts_replaced
Is there a way to count the following in the combined Query?
1. Number of records that contain a unique JobNum.
2. Number of parts replaced on each Job.
3. Total number of parts replaced on all Jobs.
Thanks!
dz
Code:
SELECT qry_convert_allJobs.*, qry_convert_parts_replaced.Part_Name, qry_convert_parts_replaced.PartSN
FROM qry_convert_allJobs LEFT JOIN qry_convert_parts_replaced ON qry_convert_allJobs.JobNum = qry_convert_parts_replaced.JobNum;
Here is each Query by itself:
qry_convert_allJobs
Code:
SELECT tbl_Jobs.JobNum, tbl_Jobs.Date_Completed, tbl_LRU.LRU_Name, tbl_Jobs.LRU_SN, tbl_Jobs.Comments, tbl_Jobs.NFF, tbl_Jobs.Customer, tbl_aircraft.aircraftType
FROM tbl_LRU INNER JOIN (tbl_aircraft RIGHT JOIN tbl_Jobs ON tbl_aircraft.aircraftID = tbl_Jobs.aircraftID) ON tbl_LRU.LRUID = tbl_Jobs.LRU_Repair;
qry_convert_parts_replaced
Code:
SELECT tbl_Jobs.JobNum, tbl_LRU.LRU_Name, tbl_Parts.Part_Name, tbl_Parts_Replaced.PartSN
FROM tbl_Parts INNER JOIN ((tbl_LRU INNER JOIN tbl_Jobs ON tbl_LRU.LRUID = tbl_Jobs.LRU_Repair) INNER JOIN tbl_Parts_Replaced ON tbl_Jobs.JobID = tbl_Parts_Replaced.JobID) ON tbl_Parts.PartID = tbl_Parts_Replaced.PartID
ORDER BY tbl_Jobs.JobNum;
Is there a way to count the following in the combined Query?
1. Number of records that contain a unique JobNum.
2. Number of parts replaced on each Job.
3. Total number of parts replaced on all Jobs.
Thanks!
dz