diff --git a/build/convert_pool_all.sql b/build/convert_pool_all.sql index 491ed4e..95df7af 100644 --- a/build/convert_pool_all.sql +++ b/build/convert_pool_all.sql @@ -114,6 +114,35 @@ SELECT FROM 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 plist AS ( @@ -140,8 +169,6 @@ plist AS ( ir.y0part = p.part AND ir.y0plnt = p.plnt ) - - UPDATE rlarp.osmfs_dev o SET @@ -397,34 +424,6 @@ WHERE --WHERE -- 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'); --INSERT INTO rlarp.osmf_dev SELECT * FROM rlarp.osmfs_dev;