From a50de527026fa282362e0c455837f633aa502dff Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Thu, 8 Apr 2021 12:11:02 -0400 Subject: [PATCH] update script, dont snap osm_pool fx --- build/rebuild_forecast.sh | 16 ++++++++-------- build/snap_fx.sql | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build/rebuild_forecast.sh b/build/rebuild_forecast.sh index 15d22d9..a489a3e 100644 --- a/build/rebuild_forecast.sh +++ b/build/rebuild_forecast.sh @@ -1,8 +1,8 @@ -psql -U ptrowbridge -d ubm -p 5030 -h usmidlnx01 -f build/build_forecast.sql -psql -U ptrowbridge -d ubm -p 5030 -h usmidlnx01 -f build/snap_itemm.sql -psql -U ptrowbridge -d ubm -p 5030 -h usmidlnx01 -f build/snap_cost_current.sql -psql -U ptrowbridge -d ubm -p 5030 -h usmidlnx01 -f build/snap_fx.sql -psql -U ptrowbridge -d ubm -p 5030 -h usmidlnx01 -f build/customer.sql -psql -U ptrowbridge -d ubm -p 5030 -h usmidlnx01 -f build/build_pool.sql -psql -U ptrowbridge -d ubm -p 5030 -h usmidlnx01 -f build/convert_pool_all.sql -psql -U ptrowbridge -d ubm -p 5030 -h usmidlnx01 -c "CALL rlarp.osm_stack_refresh();" +$PG -f build_forecast.sql +$PG -f snap_itemm.sql +$PG -f snap_cost_current.sql +$PG -f snap_customer.sql +$PG -f snap_fc.sql +$PG -f build_pool.sql +$PG -f convert_pool_all.sql +$PG -c "CALL rlarp.osm_stack_refresh();" diff --git a/build/snap_fx.sql b/build/snap_fx.sql index 098385c..a8ce6ca 100644 --- a/build/snap_fx.sql +++ b/build/snap_fx.sql @@ -1,9 +1,9 @@ ------------update fx rates----------------------------------------------------------------- -UPDATE rlarp.osmf_dev SET r_rate = .7900 WHERE r_currency = 'CA' AND version = 'b22'; -UPDATE rlarp.osmf_dev SET r_rate = 1.0000 WHERE r_currency = 'US' AND version = 'b22'; -UPDATE rlarp.osmf_dev SET c_rate = .7900 WHERE c_currency = 'CA' AND version = 'b22'; -UPDATE rlarp.osmf_dev SET c_rate = 1.0000 WHERE c_currency = 'US' AND version = 'b22'; -UPDATE rlarp.osm_pool SET r_rate = .7900 WHERE r_currency = 'CA' AND version = 'b22'; -UPDATE rlarp.osm_pool SET value_usd = value_loc * r_rate WHERE r_currency = 'CA' AND version = 'b22'; -UPDATE rlarp.osm_pool SET c_rate = .7900 WHERE c_currency = 'CA' AND version = 'b22'; -UPDATE rlarp.osm_pool SET cost_usd = cost_loc * c_rate WHERE c_currency = 'CA' AND version = 'b22'; +UPDATE rlarp.osmf_dev SET r_rate = .7900 WHERE r_currency = 'CA' AND version = 'b22'; +UPDATE rlarp.osmf_dev SET r_rate = 1.0000 WHERE r_currency = 'US' AND version = 'b22'; +UPDATE rlarp.osmf_dev SET c_rate = .7900 WHERE c_currency = 'CA' AND version = 'b22'; +UPDATE rlarp.osmf_dev SET c_rate = 1.0000 WHERE c_currency = 'US' AND version = 'b22'; +--UPDATE rlarp.osm_pool SET r_rate = .7900 WHERE r_currency = 'CA' AND version = 'b22'; +--UPDATE rlarp.osm_pool SET value_usd = value_loc * r_rate WHERE r_currency = 'CA' AND version = 'b22'; +--UPDATE rlarp.osm_pool SET c_rate = .7900 WHERE c_currency = 'CA' AND version = 'b22'; +--UPDATE rlarp.osm_pool SET cost_usd = cost_loc * c_rate WHERE c_currency = 'CA' AND version = 'b22';