From 474b1339153d70b2e5288d622178800b21dbcfbe Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 5 May 2020 11:31:27 -0400 Subject: [PATCH] increment cutoff date for actuals --- build/merge_actuals_exec.sql | 4 ++-- build/merge_actuals_prep.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/merge_actuals_exec.sql b/build/merge_actuals_exec.sql index 6ab1fe6..179177d 100644 --- a/build/merge_actuals_exec.sql +++ b/build/merge_actuals_exec.sql @@ -1,6 +1,6 @@ -DELETE FROM rlarp.osmf_dev WHERE odate < '2020-04-01'; -INSERT INTO rlarp.osmf_dev SELECT * FROM rlarp.osmfs_dev WHERE odate < '2020-04-01'; +DELETE FROM rlarp.osmf_dev WHERE odate < '2020-05-01'; +INSERT INTO rlarp.osmf_dev SELECT * FROM rlarp.osmfs_dev WHERE odate < '2020-05-01'; diff --git a/build/merge_actuals_prep.sql b/build/merge_actuals_prep.sql index bc4e96e..d70e25e 100644 --- a/build/merge_actuals_prep.sql +++ b/build/merge_actuals_prep.sql @@ -145,9 +145,9 @@ gld AS ( WHERE ( --base period orders booked.... - o.odate <@ daterange('2019-06-01','2020-04-01') + o.odate <@ daterange('2019-06-01','2020-05-01') --...or any open orders currently booked before cutoff.... - OR (o.calc_status IN ('OPEN','BACKORDER') and o.odate < '2020-04-01') + OR (o.calc_status IN ('OPEN','BACKORDER') and o.odate < '2020-05-01') --...or anything that shipped in that period OR o.fspr BETWEEN '2001' AND '2010' )