ECC Cost Management, Maintenance, SQL1

Description
Columns: Data Source, Ecc Spec Id, Org Type Code, Data Type Code, Data Source Grp Code, Data Source Desc Code, Wip Entity Id, Wip Entity Name, Organization Id, Last Update Date ...
Imported from ECC
SELECT * FROM (SELECT ORG_TYPE,
DATA_SOURCE,
ECC_SPEC_ID,
DATA_TYPE,
DATA_SOURCE_GRP,
DATA_SOURCE_DESCRIPTION,
ORG_TYPE_CODE,
DATA_TYPE_CODE,
DATA_SOURCE_GRP_CODE,
DATA_SOURCE_DESC_CODE,
WIP_ENTITY_ID,
WIP_ENTITY_NAME,
ORGANIZATION_ID,
LAST_UPDATE_DATE,
CREATION_DATE,
SOURCE_LINE_ID,
SOURCE_CODE,
DESCRIPTION,
PRIMARY_ITEM_ID,
JOB_TYPE,
WIP_SUPPLY_TYPE,
CLASS_CODE,
MATERIAL_ACCOUNT,
MATERIAL_OVERHEAD_ACCOUNT,
RESOURCE_ACCOUNT,
OUTSIDE_PROCESSING_ACCOUNT,
MATERIAL_VARIANCE_ACCOUNT,
RESOURCE_VARIANCE_ACCOUNT,
OUTSIDE_PROC_VARIANCE_ACCOUNT,
STD_COST_ADJUSTMENT_ACCOUNT,
OVERHEAD_ACCOUNT,
OVERHEAD_VARIANCE_ACCOUNT,
SCHEDULED_START_DATE,
SCHEDULED_START_MONTH,
DATE_RELEASED,
SCHEDULED_COMPLETION_DATE,
DATE_COMPLETED,
DATE_CLOSED,
START_QUANTITY,
QUANTITY_COMPLETED,
QUANTITY_SCRAPPED,
NET_QUANTITY,
BOM_REFERENCE_ID,
ROUTING_REFERENCE_ID,
COMMON_BOM_SEQUENCE_ID,
COMMON_ROUTING_SEQUENCE_ID,
BOM_REVISION,
ROUTING_REVISION,
LOT_NUMBER,
ALTERNATE_BOM_DESIGNATOR,
ALTERNATE_ROUTING_DESIGNATOR,
COMPLETION_SUBINVENTORY,
COMPLETION_LOCATOR_ID,
MPS_SCHEDULED_COMPLETION_DATE,
MPS_NET_QUANTITY,
DEMAND_CLASS,
SCHEDULE_GROUP_ID,
BUILD_SEQUENCE,
LINE_ID,
ITEM_NAME,
ITEM_DESCRIPTION,
PRIMARY_COST_METHOD,
ORGANIZATION_CODE,
ORGANIZATION_NAME,
COST_ORGANIZATION,
MASTER_ORGANIZATION,
SOB_NAME,
PERIOD_SET_NAME,
CHART_OF_ACCOUNTS_NAME,
ORG_CURRENCY_CODE,
OPERATING_UNIT,
LEGAL_ENTITY,
PERIOD_NAME,
PERIOD_YEAR,
PERIOD_NUM,
KANBAN_CARD_ID,
OVERCOMPLETION_TOLERANCE_TYPE,
OVERCOMPLETION_TOLERANCE_VALUE,
END_ITEM_UNIT_NUMBER,
PRIORITY,
DUE_DATE,
EST_SCRAP_ACCOUNT,
EST_SCRAP_VAR_ACCOUNT,
EST_SCRAP_PRIOR_QTY,
DUE_DATE_PENALTY,
DUE_DATE_TOLERANCE,
PARENT_WIP_ENTITY_ID,
ASSET_NUMBER,
ASSET_GROUP_ID,
REBUILD_ITEM_ID,
REBUILD_SERIAL_NUMBER,
MANUAL_REBUILD_FLAG,
SHUTDOWN_TYPE,
ESTIMATION_STATUS,
REQUESTED_START_DATE,
NOTIFICATION_REQUIRED,
WORK_ORDER_TYPE,
OWNING_DEPARTMENT,
ACTIVITY_TYPE,
ACTIVITY_CAUSE,
TAGOUT_REQUIRED,
PLAN_MAINTENANCE,
PM_SCHEDULE_ID,
LAST_ESTIMATION_DATE,
LAST_ESTIMATION_REQ_ID,
ACTIVITY_SOURCE,
MAINTENANCE_OBJECT_ID,
MAINTENANCE_OBJECT_TYPE,
MAINTENANCE_OBJECT_SOURCE,
MATERIAL_ISSUE_BY_MO,
SCHEDULING_REQUEST_ID,
ISSUE_ZERO_COST_FLAG,
EAM_LINEAR_LOCATION_ID,
ACTUAL_START_DATE,
EXPECTED_HOLD_RELEASE_DATE,
EXPEDITED,
PERIOD_STATUS,
LANGUAGE,
REQUEST_ID,
PROGRAM_ID,
PROGRAM_APPLICATION_ID,
CONCURRENT_PROGRAM_NAME,
PERIOD_STATUS_CODE         ,
PERIOD_STATUS_CODE COSTING_PERIOD_STATUS_CODE ,
PERIOD_STATUS COSTING_PERIOD_STATUS
FROM CST_ECC_PHC_EAM_WO_V
where language in ('US') ) PIVOT (max(PERIOD_STATUS) as PERIOD_STATUS,
                                              max(ORG_TYPE) as ORG_TYPE,
                                              max(DATA_TYPE) as DATA_TYPE,
                                              max(DATA_SOURCE_GRP) as DATA_SOURCE_GRP,
                                              max(DATA_SOURCE_DESCRIPTION) as DATA_SOURCE_DESCRIPTION,
                                              max(ITEM_DESCRIPTION) as ITEM_DESCRIPTION,
                                              max(ORGANIZATION_NAME) as ORGANIZATION_NAME,
											  max(CONCURRENT_PROGRAM_NAME) as CONCURRENT_PROGRAM_NAME,
											  max(JOB_TYPE) as JOB_TYPE,
											  max(WIP_SUPPLY_TYPE) as WIP_SUPPLY_TYPE,
                                              max(OPERATING_UNIT) as OPERATING_UNIT,
											  max(COSTING_PERIOD_STATUS) as COSTING_PERIOD_STATUS
                                              for LANGUAGE in ('US' "US"))