Identify Assembly and Component Product Reconcile Group Mismatch

From KeystoneIntranet
Revision as of 11:55, 25 October 2023 by Pmorey (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Identify overall product reconcile group mismatches

SELECT x.assy_product_code,x.comp_product_code,pa.reconcile_group,pc.reconcile_group
FROM artprstr x
inner join artprod pa on pa.product_code=x.assy_product_code
inner join artprod pc on pc.product_code=x.comp_product_code
where pa.reconcile_group<>pc.reconcile_group

Identify product reconcile group mismatches for a reconcile group range

SELECT x.assy_product_code,x.comp_product_code,pa.reconcile_group,pc.reconcile_group
FROM artprstr x
inner join artprod pa on pa.product_code=x.assy_product_code
inner join artprod pc on pc.product_code=x.comp_product_code
where
((pa.reconcile_group between :lorecgrp and :hirecgrp) and
 (not (pc.reconcile_group between :lorecgrp and :hirecgrp))) or
((pc.reconcile_group between :lorecgrp and :hirecgrp) and
 (not (pa.reconcile_group between :lorecgrp and :hirecgrp)))