fix casts

This commit is contained in:
Trowbridge 2020-02-12 17:13:00 -05:00
parent e7904d5040
commit ae9bba67bd

View File

@ -1,5 +1,5 @@
--\timing
truncate table rlarp.osmfs;
truncate table rlarp.osmf_dev;
WITH
gld AS (
@ -106,14 +106,14 @@ gld AS (
,null::text assc
,null::text ddunit
,null::text unti
,null::text lbs
,null::text plt
,null::numeric lbs
,null::numeric plt
,null::text plcd
,o.fs_line
,o.r_currency
,null::text r_rate
,null::numeric r_rate
,o.c_currency
,null::text c_rate
,null::numeric c_rate
,sum(o.fb_qty) fb_qty
,sum(o.fb_val_loc) fb_val_loc
,sum(o.fb_val_loc_dis) fb_val_loc_dis
@ -250,14 +250,14 @@ gld AS (
,null::text assc
,null::text ddunit
,null::text unti
,null::text lbs
,null::text plt
,null::numeric lbs
,null::numeric plt
,null::text plcd
,o.fs_line
,o.r_currency
,null::text r_rate
,null::numeric r_rate
,o.c_currency
,null::text c_rate
,null::numeric c_rate
,sum(o.fb_qty) fb_qty
,sum(o.fb_val_loc) fb_val_loc
,sum(o.fb_val_loc_dis) fb_val_loc_dis
@ -390,14 +390,14 @@ gld AS (
,null::text assc
,null::text ddunit
,null::text unti
,null::text lbs
,null::text plt
,null::numeric lbs
,null::numeric plt
,null::text plcd
,o.fs_line
,o.r_currency
,null::text r_rate
,null::numeric r_rate
,o.c_currency
,null::text c_rate
,null::numeric c_rate
,sum(o.fb_qty) fb_qty
,sum(o.fb_val_loc) fb_val_loc
,sum(o.fb_val_loc_dis) fb_val_loc_dis
@ -564,7 +564,7 @@ UNION ALL
SELECT * FROM baseline;
---identify short ships: causes disconnect with actual sales-------------------------------------------------------------------
UPDATE rlarp.osmfs SET iter = 'short ship' WHERE calc_status = 'CLOSED' AND flag = 'REMAINDER';
--UPDATE rlarp.osmfs SET iter = 'short ship' WHERE calc_status = 'CLOSED' AND flag = 'REMAINDER';
---identify goofy ship dates: causes disconnect with sales when splicing in a forecast that has this problem-------------------
UPDATE rlarp.osmfs SET iter = 'bad date' WHERE adj_shipdate < adj_orderdate;
--UPDATE rlarp.osmfs SET iter = 'bad date' WHERE adj_shipdate < adj_orderdate;