insert directly into the pool and igonore net cost amount as a filter

This commit is contained in:
Paul Trowbridge 2021-05-03 09:09:21 -04:00
parent e79c0d5bb4
commit f2b6686f3e
2 changed files with 3 additions and 1 deletions

View File

@ -171,6 +171,8 @@ FROM
--LIMIT 100 --LIMIT 100
) WITH DATA; ) 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); --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); --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); --CREATE INDEX osm_pool_logid ON rlarp.osm_pool(logid);

View File

@ -610,7 +610,7 @@ SELECT * FROM baseline
HAVING HAVING
round(sum(o.fb_qty),2) <> 0 round(sum(o.fb_qty),2) <> 0
OR round(sum(o.fb_val_loc),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; INSERT INTO rlarp.osmf_dev SELECT * FROM merge_diff;