Joseph Lee
04/05/2023, 10:52 PMLucas
04/06/2023, 7:07 AMLucas
04/06/2023, 7:07 AMSELECT
a.item AS assembly_id,
a.itemname AS assembly_name,
b.item AS component_id,
b.itemname AS component_name,
c.quantity
FROM
item AS a
JOIN
bomrevision AS br ON a.id = br.assembly
JOIN
bomrevisionmember AS c ON br.id = c.bomrevision
JOIN
item AS b ON c.component = b.id
WHERE
a.type = 'Assembly'
AND a.islotitem = 'T'
AND br.isinactive = 'F'
AND c.isinactive = 'F'
AND b.isinactive = 'F'
ORDER BY
a.itemname, b.itemname;
Lucas
04/06/2023, 7:07 AMSELECT
a.id AS assembly_id,
a.itemid AS assembly_name,
b.id AS component_id,
b.itemid AS component_name,
c.quantity
FROM
assemblyitem AS a
JOIN
assemblyitembillofmaterials AS abm ON a.id = abm.assembly
JOIN
bomrevisionmember AS c ON abm.billofmaterials = c.billofmaterials
JOIN
item AS b ON c.member = b.id
WHERE
a.islotitem = 'T'
AND abm.isinactive = 'F'
AND c.isinactive = 'F'
AND b.isinactive = 'F'
ORDER BY
a.itemid, b.itemid;
Alan Fitch
04/10/2023, 4:01 PM