BF2033473 RV_PP_Product_BOMLine incorrect in DB

+ Add Order By Seqno
+ Fix Multi-Level BOM sort order
This commit is contained in:
tspc 2008-08-01 05:23:21 +00:00
parent dc2744b078
commit 49f2daddf6
2 changed files with 26 additions and 64 deletions

View File

@ -1,32 +1,13 @@
-- DROP VIEW rv_pp_product_bomline;
CREATE OR REPLACE VIEW rv_pp_product_bomline AS
SELECT
t.seqno,
t.levelno,
t.levels,
t.ad_client_id,
t.ad_org_id,
t.createdby,
t.updatedby,
t.updated,
t.created,
t.ad_pinstance_id,
bl.isactive,
bl.pp_product_bom_id,
bl.pp_product_bomline_id,
bl.description, bl.iscritical,
bl.componenttype,
t.m_product_id,
bl.c_uom_id,
bl.issuemethod,
bl.line,
bl.m_attributesetinstance_id,
bl.scrap,
bl.validfrom,
bl.validto,
bl.qtybom,
bl.qtybatch,
bl.isqtypercentage
FROM pp_product_bomline bl
RIGHT JOIN t_bomline t ON t.pp_product_bomline_id = bl.pp_product_bomline_id
ORDER BY t.seqno;
CREATE OR REPLACE VIEW rv_pp_product_bomline
AS
SELECT t.seqno, t.levelno, t.levels, t.ad_client_id,
t.ad_org_id, t.createdby, t.updatedby, t.updated,
t.created, t.ad_pinstance_id, t.implosion, t.sel_product_id as m_product_id,
bl.isactive, bl.pp_product_bom_id, bl.pp_product_bomline_id, bl.description,
bl.iscritical, bl.componenttype, t.m_product_id as tm_product_id, bl.c_uom_id,
bl.issuemethod, bl.line, bl.m_attributesetinstance_id, bl.scrap,
bl.validfrom, bl.validto, bl.qtybom, bl.qtybatch, bl.isqtypercentage
FROM t_bomline t LEFT OUTER JOIN pp_product_bomline bl
ON t.pp_product_bomline_id = bl.pp_product_bomline_id
ORDER BY t.seqno
;

View File

@ -1,32 +1,13 @@
-- DROP VIEW rv_pp_product_bomline;
CREATE OR REPLACE VIEW rv_pp_product_bomline AS
SELECT
t.seqno,
t.levelno,
t.levels,
t.ad_client_id,
t.ad_org_id,
t.createdby,
t.updatedby,
t.updated,
t.created,
t.ad_pinstance_id,
bl.isactive,
bl.pp_product_bom_id,
bl.pp_product_bomline_id,
bl.description, bl.iscritical,
bl.componenttype,
t.m_product_id,
bl.c_uom_id,
bl.issuemethod,
bl.line,
bl.m_attributesetinstance_id,
bl.scrap,
bl.validfrom,
bl.validto,
bl.qtybom,
bl.qtybatch,
bl.isqtypercentage
FROM pp_product_bomline bl
RIGHT JOIN t_bomline t ON t.pp_product_bomline_id = bl.pp_product_bomline_id
ORDER BY t.seqno;
CREATE OR REPLACE VIEW rv_pp_product_bomline
AS
SELECT t.seqno, t.levelno, t.levels, t.ad_client_id,
t.ad_org_id, t.createdby, t.updatedby, t.updated,
t.created, t.ad_pinstance_id, t.implosion, t.sel_product_id as m_product_id,
bl.isactive, bl.pp_product_bom_id, bl.pp_product_bomline_id, bl.description,
bl.iscritical, bl.componenttype, t.m_product_id as tm_product_id, bl.c_uom_id,
bl.issuemethod, bl.line, bl.m_attributesetinstance_id, bl.scrap,
bl.validfrom, bl.validto, bl.qtybom, bl.qtybatch, bl.isqtypercentage
FROM t_bomline t LEFT OUTER JOIN pp_product_bomline bl
ON t.pp_product_bomline_id = bl.pp_product_bomline_id
ORDER BY t.seqno
;