set item master attributes prior to anythign else

This commit is contained in:
Paul Trowbridge 2021-04-13 12:48:09 -04:00
parent 50da4dfa17
commit 7e4049d27d

View File

@ -114,6 +114,35 @@ SELECT
FROM FROM
rlarp.osm_pool; rlarp.osm_pool;
-------need to set item master values before other things-----------
UPDATE
RLARP.OSMFS_DEV O
SET
COLC = M.COLC
,COLGRP = M.COLGRP
,COLTIER = M.COLTIER
,COLSTAT = M.COLSTAT
,SIZC = M.SIZC
,PCKG = M.PACKAGE
,KIT = M.KIT
,BRND = M.BRANDING
,MAJG = M.MAJG
,MING = M.MING
,MAJS = M.MAJS
,MINS = M.MINS
,GLDC = M.GLCD
,GLEC = M.GLEC
,HARM = M.HARM
,CLSS = M.CLSS
,BRAND = M.BRAND
,ASSC = M.ASSC
,LBS = CASE M.NWUN WHEN 'KG' THEN 2.2046 ELSE 1 END*M.NWHT
,UNTI = M.UNTI
FROM
RLARP.ITEMM M
WHERE
M.ITEM = O.PART;
WITH WITH
plist AS ( plist AS (
@ -140,8 +169,6 @@ plist AS (
ir.y0part = p.part ir.y0part = p.part
AND ir.y0plnt = p.plnt AND ir.y0plnt = p.plnt
) )
UPDATE UPDATE
rlarp.osmfs_dev o rlarp.osmfs_dev o
SET SET
@ -397,34 +424,6 @@ WHERE
--WHERE --WHERE
-- c_currency = 'US'; -- c_currency = 'US';
UPDATE
RLARP.OSMFS_DEV O
SET
COLC = M.COLC
,COLGRP = M.COLGRP
,COLTIER = M.COLTIER
,COLSTAT = M.COLSTAT
,SIZC = M.SIZC
,PCKG = M.PACKAGE
,KIT = M.KIT
,BRND = M.BRANDING
,MAJG = M.MAJG
,MING = M.MING
,MAJS = M.MAJS
,MINS = M.MINS
,GLDC = M.GLCD
,GLEC = M.GLEC
,HARM = M.HARM
,CLSS = M.CLSS
,BRAND = M.BRAND
,ASSC = M.ASSC
,LBS = CASE M.NWUN WHEN 'KG' THEN 2.2046 ELSE 1 END*M.NWHT
,UNTI = M.UNTI
FROM
RLARP.ITEMM M
WHERE
M.ITEM = O.PART;
--DELETE FROM rlarp.osmf_dev WHERE iter IN ('adj price','adj volume'); --DELETE FROM rlarp.osmf_dev WHERE iter IN ('adj price','adj volume');
--INSERT INTO rlarp.osmf_dev SELECT * FROM rlarp.osmfs_dev; --INSERT INTO rlarp.osmf_dev SELECT * FROM rlarp.osmfs_dev;