CST_ALL_EXPENSE_POOL_TXNS_V

Details

  • Schema: FUSION

  • Object owner: CST

  • Object type: VIEW

Columns

Name

EXPENSE_POOL_ID

UNIT_COST

COST_SOURCE

COST_REFERENCE

COST_ID

SOURCE_TABLE

TRANSACTION_COST_ID

TRANSACTION_ID

STD_COST_ID

OVERHEAD_ID

RULE_DETAIL_ID

RULE_CODE

ABSORPTION_TYPE

COST_DRIVER

COST_DRIVER_VALUE

ESTIMATED_RATE

Query

SQL_Statement

SELECT

clc.expense_pool_id,

clc.unit_cost,

clc.cost_source,

clc.cost_reference,

clc.layer_cost_id cost_id,

'cst_layer_costs' source_table,

clc.transaction_cost_id,

clc.transaction_id,

clc.std_cost_id,

DECODE( clc.expense_pool_id, 0, NULL, cto.overhead_id) overhead_id,

DECODE( clc.expense_pool_id, 0, NULL, cto.rule_detail_id) rule_detail_id,

DECODE( clc.expense_pool_id, 0, NULL, SUBSTR(cto.rule_code,1,INSTR(cto.rule_code, '?')-1)) rule_code,

DECODE( clc.expense_pool_id, 0, NULL, cto.absorption_type) absorption_type,

DECODE( clc.expense_pool_id, 0, NULL, cto.cost_driver) cost_driver,

DECODE( clc.expense_pool_id, 0, NULL, cto.cost_driver_value) cost_driver_value,

DECODE( clc.expense_pool_id, 0, NULL, cto.estimated_rate) estimated_rate

FROM

fusion.cst_layer_costs clc,

fusion.cst_transaction_overheads cto

where

clc.transaction_cost_id = cto.transaction_cost_id (+)

UNION

SELECT

expense_pool_id,

unit_cost,

cost_source,

cost_reference,

writeoff_cost_id cost_id,

'cst_writeoff_costs' source_table,

transaction_cost_id,

transaction_id,

NULL std_cost_id,

NULL overhead_id,

NULL rule_detail_id,

NULL rule_code,

NULL absorption_type,

NULL cost_driver,

NULL cost_driver_value,

NULL estimated_rate

FROM

fusion.cst_writeoff_costs cwc

UNION

SELECT

expense_pool_id,

unit_cost,

cost_source,

cost_reference,

transfer_cost_id cost_id,

'cst_transfer_costs' source_table,

transaction_cost_id,

transaction_id,

NULL std_cost_id,

NULL overhead_id,

NULL rule_detail_id,

NULL rule_code,

NULL absorption_type,

NULL cost_driver,

NULL cost_driver_value,

NULL estimated_rate

FROM

fusion.cst_transfer_costs ctc

UNION

SELECT

expense_pool_id,

unit_cost,

cost_source,

cost_reference,

resource_cost_id cost_id,

'cst_resource_costs' source_table,

NULL transaction_cost_id,

crc.resource_transaction_id transaction_id,

std_resource_rate_id std_cost_id,

NULL overhead_id,

NULL rule_detail_id,

NULL rule_code,

NULL absorption_type,

NULL cost_driver,

NULL cost_driver_value,

NULL estimated_rate

FROM

fusion.cst_resource_costs crc

UNION

SELECT

expense_pool_id,

unit_cost,

cost_source,

cost_reference,

operation_txn_cost_id cost_id,

'cst_operation_txn_costs' source_table,

NULL transaction_cost_id,

cotc.operation_transaction_id transaction_id,

NULL std_cost_id,

NULL overhead_id,

NULL rule_detail_id,

NULL rule_code,

NULL absorption_type,

NULL cost_driver,

NULL cost_driver_value,

NULL estimated_rate

FROM

fusion.cst_operation_txn_costs cotc

UNION

SELECT

expense_pool_id,

unit_cost,

cost_source,

cost_reference,

wo_osp_cost_id cost_id,

'cst_wo_osp_costs' source_table,

transaction_cost_id,

transaction_id,

NULL std_cost_id,

NULL overhead_id,

NULL rule_detail_id,

NULL rule_code,

NULL absorption_type,

NULL cost_driver,

NULL cost_driver_value,

NULL estimated_rate

FROM

fusion.cst_wo_osp_costs cwoc