comments
This commit is contained in:
parent
15b515a5e1
commit
b6edc4006a
@ -29,6 +29,8 @@ SELECT (SELECT cname FROM fc.target_meta WHERE appcol = 'order_date') INTO _orde
|
|||||||
SELECT (SELECT cname FROM fc.target_meta WHERE appcol = 'ship_date') INTO _ship_date;
|
SELECT (SELECT cname FROM fc.target_meta WHERE appcol = 'ship_date') INTO _ship_date;
|
||||||
SELECT (SELECT cname FROM fc.target_meta WHERE appcol = 'order_status') INTO _order_status;
|
SELECT (SELECT cname FROM fc.target_meta WHERE appcol = 'order_status') INTO _order_status;
|
||||||
|
|
||||||
|
--------------------------------------clone the actual baseline-----------------------------------------------
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
$a$SELECT
|
$a$SELECT
|
||||||
$a$::text||
|
$a$::text||
|
||||||
@ -53,6 +55,10 @@ INTO
|
|||||||
_ytdbody;
|
_ytdbody;
|
||||||
|
|
||||||
--RAISE NOTICE '%', _ytdbody;
|
--RAISE NOTICE '%', _ytdbody;
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------pull a plug from actuals to create a full year baseline------------------
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
$$
|
$$
|
||||||
,'baseline' "version"
|
,'baseline' "version"
|
||||||
@ -70,6 +76,8 @@ $$
|
|||||||
INTO
|
INTO
|
||||||
_actpy;
|
_actpy;
|
||||||
|
|
||||||
|
------------------------------stack the sql into the final format------------------------------------------------
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
_ytdbody
|
_ytdbody
|
||||||
||$$UNION ALL
|
||$$UNION ALL
|
||||||
|
Loading…
Reference in New Issue
Block a user