From f2b6686f3e309202f90c220f73fa430ccfe9f7dc Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Mon, 3 May 2021 09:09:21 -0400 Subject: [PATCH] insert directly into the pool and igonore net cost amount as a filter --- build/build_pool.sql | 2 ++ build/build_stage.sql | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/build_pool.sql b/build/build_pool.sql index 954a24b..e1f2685 100644 --- a/build/build_pool.sql +++ b/build/build_pool.sql @@ -171,6 +171,8 @@ FROM --LIMIT 100 ) WITH DATA; +INSERT INTO rlarp.osm_pool SELECT * FROM rlarp.osm_pool_stage; + --CREATE INDEX osm_qr ON rlarp.osm_pool(quota_rep_descr, bill_cust_descr, ship_cust_descr); --ALTER TABLE rlarp.osm_pool ADD CONSTRAINT logfk FOREIGN KEY (logid) REFERENCES rlarp.osm_log(id); --CREATE INDEX osm_pool_logid ON rlarp.osm_pool(logid); diff --git a/build/build_stage.sql b/build/build_stage.sql index 05cc6ee..db18bb6 100644 --- a/build/build_stage.sql +++ b/build/build_stage.sql @@ -610,7 +610,7 @@ SELECT * FROM baseline HAVING round(sum(o.fb_qty),2) <> 0 OR round(sum(o.fb_val_loc),2) <> 0 - OR round(sum(o.fb_cst_loc),2) <> 0 + --OR round(sum(o.fb_cst_loc),2) <> 0 ) INSERT INTO rlarp.osmf_dev SELECT * FROM merge_diff;