This commit is contained in:
Paul Trowbridge 2020-11-06 00:00:34 -05:00
parent 15b515a5e1
commit b6edc4006a

View File

@ -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 = 'order_status') INTO _order_status;
--------------------------------------clone the actual baseline-----------------------------------------------
SELECT
$a$SELECT
$a$::text||
@ -53,6 +55,10 @@ INTO
_ytdbody;
--RAISE NOTICE '%', _ytdbody;
------------------------------------pull a plug from actuals to create a full year baseline------------------
SELECT
$$
,'baseline' "version"
@ -70,6 +76,8 @@ $$
INTO
_actpy;
------------------------------stack the sql into the final format------------------------------------------------
SELECT
_ytdbody
||$$UNION ALL