i have two table
WorkOrder(WorkOrderNO, TotalQty)
Rework(WorkOrderNo, DefectQty, RepairQty, ScrapQty)
How can join this two table and show out the workorderno, the sum of defectqty, repairqty and totalqty?
Printable View
i have two table
WorkOrder(WorkOrderNO, TotalQty)
Rework(WorkOrderNo, DefectQty, RepairQty, ScrapQty)
How can join this two table and show out the workorderno, the sum of defectqty, repairqty and totalqty?
If you have Access, Why not using the Query SQl designer.
It's real easy to use (Drag and Drop). :)
You can do something like this:
Code:SELECT
WO.WorkOrderNO,
Sum(RE.DefectQty) As Summary,
RE.RepairQty,
WO.TotalQty
FROM
WorkOrder WO,
Rework RE
WHERE
WO.WorkOrderNO = RE.WorkOrderNO
GROUP BY
WO.WorkOrderNO