increment range for actuals
This commit is contained in:
parent
474b133915
commit
c0e348bb2f
@ -1,6 +1,3 @@
|
|||||||
|
|
||||||
DELETE FROM rlarp.osmf_dev WHERE odate < '2020-05-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';
|
INSERT INTO rlarp.osmf_dev SELECT * FROM rlarp.osmfs_dev WHERE odate < '2020-05-01';
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
BEGIN;
|
BEGIN;
|
||||||
|
|
||||||
DELETE FROM rlarp.osm_pool WHERE order_date < '2020-04-01';
|
DELETE FROM rlarp.osm_pool WHERE order_date < '2020-05-01';
|
||||||
|
|
||||||
INSERT INTO rlarp.osm_pool
|
INSERT INTO rlarp.osm_pool
|
||||||
WITH
|
WITH
|
||||||
@ -134,7 +134,7 @@ FROM
|
|||||||
LEFT OUTER JOIN rlarp.itemm i ON
|
LEFT OUTER JOIN rlarp.itemm i ON
|
||||||
i.item = o.part
|
i.item = o.part
|
||||||
WHERE
|
WHERE
|
||||||
odate < '2020-04-01';
|
odate < '2020-05-01';
|
||||||
|
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -149,11 +149,12 @@ gld AS (
|
|||||||
--...or any open orders currently booked before cutoff....
|
--...or any open orders currently booked before cutoff....
|
||||||
OR (o.calc_status IN ('OPEN','BACKORDER') and o.odate < '2020-05-01')
|
OR (o.calc_status IN ('OPEN','BACKORDER') and o.odate < '2020-05-01')
|
||||||
--...or anything that shipped in that period
|
--...or anything that shipped in that period
|
||||||
OR o.fspr BETWEEN '2001' AND '2010'
|
OR o.fspr BETWEEN '2001' AND '2011'
|
||||||
)
|
)
|
||||||
AND fs_line = '41010'
|
AND fs_line = '41010'
|
||||||
AND calc_status <> 'CANCELED'
|
AND calc_status <> 'CANCELED'
|
||||||
AND NOT (calc_status = 'CLOSED' AND flag = 'REMAINDER')
|
AND NOT (calc_status = 'CLOSED' AND flag = 'REMAINDER')
|
||||||
|
AND "version" = 'ACTUALS'
|
||||||
GROUP BY
|
GROUP BY
|
||||||
o.fspr
|
o.fspr
|
||||||
,plnt
|
,plnt
|
||||||
|
Loading…
Reference in New Issue
Block a user