convert script to live db and do rounding on final build
This commit is contained in:
parent
f2b6686f3e
commit
032736f0e9
@ -121,11 +121,11 @@ SELECT
|
||||
,r_rate
|
||||
,c_currency
|
||||
,c_rate
|
||||
,fb_qty units
|
||||
,fb_val_loc value_loc
|
||||
,fb_val_loc * r_rate value_usd
|
||||
,fb_cst_loc_cur cost_loc
|
||||
,fb_cst_loc_cur * c_rate cost_usd
|
||||
,round(fb_qty,2) units
|
||||
,round(fb_val_loc,2) value_loc
|
||||
,round(fb_val_loc * r_rate,2) value_usd
|
||||
,round(fb_cst_loc_cur,2) cost_loc
|
||||
,round(fb_cst_loc_cur * c_rate,2) cost_usd
|
||||
,calc_status
|
||||
,flag
|
||||
,o.odate order_date
|
||||
@ -171,7 +171,7 @@ FROM
|
||||
--LIMIT 100
|
||||
) WITH DATA;
|
||||
|
||||
INSERT INTO rlarp.osm_pool SELECT * FROM rlarp.osm_pool_stage;
|
||||
--INSERT INTO rlarp.osm_pool SELECT * FROM rlarp.osm_pool_stage;
|
||||
|
||||
--CREATE INDEX osm_qr ON rlarp.osm_pool(quota_rep_descr, bill_cust_descr, ship_cust_descr);
|
||||
--ALTER TABLE rlarp.osm_pool ADD CONSTRAINT logfk FOREIGN KEY (logid) REFERENCES rlarp.osm_log(id);
|
||||
|
@ -1,5 +1,5 @@
|
||||
$PGD -f ./build_stage.sql
|
||||
$PGD -f ./snap_itemm.sql
|
||||
$PGD -f ./snap_cost_current.sql
|
||||
$PGD -f ./snap_customer.sql
|
||||
$PGD -f ./build_pool.sql
|
||||
$PG -f ./build_stage.sql
|
||||
$PG -f ./snap_itemm.sql
|
||||
$PG -f ./snap_cost_current.sql
|
||||
$PG -f ./snap_customer.sql
|
||||
$PG -f ./build_pool.sql
|
||||
|
Loading…
Reference in New Issue
Block a user