Push fct_open_position and fct_trade_fullfillment_event
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
|
||||
--DROP VIEW IF EXISTS vw_bi_fct_trade_fulfillment_event;
|
||||
|
||||
CREATE OR REPLACE VIEW vw_bi_fct_trade_fulfillment_event AS
|
||||
SELECT
|
||||
SM."intPurchaseLineId" AS "inTradeId",
|
||||
'Physical' AS "Trade Category",
|
||||
'Purchase' AS "Trade Type",
|
||||
'Delivered' AS "Event Type",
|
||||
SM."dtmBLDate" AS "Event Date",
|
||||
SM."dblQuantity" AS "Quantity"
|
||||
@@ -10,8 +14,9 @@ CREATE OR REPLACE VIEW vw_bi_fct_trade_fulfillment_event AS
|
||||
AND COALESCE( SM."intPurchaseLineId" , 0 ) > 0
|
||||
UNION ALL
|
||||
SELECT
|
||||
SM."intSaleLineId" AS "inTradeId",
|
||||
SM."intSaleLineId" AS "inTradeId",
|
||||
'Physical' AS "Trade Category",
|
||||
'Sale' AS "Trade Type",
|
||||
'Delivered' AS "Event Type",
|
||||
SM."dtmBLDate" AS "Event Date",
|
||||
SM."dblQuantity" AS "Quantity"
|
||||
|
||||
Reference in New Issue
Block a user