diff --git a/build/build_pool.sql b/build/build_pool.sql index 6a4392b..8214724 100644 --- a/build/build_pool.sql +++ b/build/build_pool.sql @@ -22,6 +22,7 @@ repc AS ( WHERE C.A2 = 'MM' ) +--select * from repc ,SEG AS ( SELECT GLEC @@ -46,17 +47,22 @@ repc AS ( ('9TO','Other') ) X(GLEC, SEGM) ) +--select * from seg ----------------------------------------------------sales major codes---------------------------------------------------------------------------------------------------------------------------------- ,SJ AS ( SELECT * FROM LGDAT.MMSL WHERE COALESCE(BSMNCD,'') = '' ) +--select * from sj ----------------------------------------------------sales minor codes---------------------------------------------------------------------------------------------------------------------------------- ,SI AS ( SELECT * FROM LGDAT.MMSL WHERE COALESCE(BSMNCD,'') <> '' ) +--select * from si ,logload AS ( INSERT INTO rlarp.osm_log (doc) SELECT jsonb_build_object('user',current_user,'tag','1+11','type','build_pool','stamp',current_timestamp,'source','top level','message','don''t undo') RETURNING * ) +--select * from logload +,loadset AS ( SELECT fspr ,plnt @@ -174,7 +180,8 @@ FROM seg.glec = o.glec LEFT OUTER JOIN rlarp.itemm i ON i.item = o.part - --LIMIT 100 +) +SELECT * FROM loadset ) WITH DATA;