DBA Data[Home] [Help]

VIEW: APPS.WIP_OPERATION_RESOURCE_USAGE_V

Source

View Text - Preformatted

SELECT wor.wip_entity_id wip_entity_id, wor.repetitive_schedule_id repetitive_schedule_id, wor.organization_id organization_id, wor.operation_seq_num operation_seq_num, wor.resource_seq_num resource_seq_num, wor.resource_id, br.resource_code, bdr.department_id, bd.department_code, bdr.share_from_dept_id, decode(woru.start_date, null, wor.start_date, woru.start_date) start_date, decode(woru.completion_date, null, wor.completion_date, woru.completion_date) completion_date, decode(woru.assigned_units, NULL, wor.assigned_units, woru.assigned_units) assigned_units, wor.scheduled_flag, woru.instance_id, woru.serial_number, decode(wor.parent_resource_seq, null, 0, 1) setup, woru.cumulative_processing_time from bom_resources br, bom_departments bd, bom_department_resources bdr, wip_operations wo, wip_operation_resource_usage woru, wip_operation_resources wor where woru.wip_entity_id(+) = wor.wip_entity_id and woru.operation_seq_num(+) = wor.operation_seq_num and woru.resource_seq_num(+) = wor.resource_seq_num and woru.organization_id(+) = wor.organization_id and nvl(woru.repetitive_schedule_id(+),-1) = nvl(wor.repetitive_schedule_id,-1) and wor.scheduled_flag in (1,3,4) and bd.department_id = bdr.department_id and bdr.department_id = wo.department_id and br.resource_id = bdr.resource_id and bdr.resource_id = wor.resource_id and wo.organization_id = wor.organization_id and wo.wip_entity_id = wor.wip_entity_id and wo.operation_seq_num = wor.operation_seq_num and nvl(wo.repetitive_schedule_id,-1) = nvl(wor.repetitive_schedule_id,-1)
View Text - HTML Formatted

SELECT WOR.WIP_ENTITY_ID WIP_ENTITY_ID
, WOR.REPETITIVE_SCHEDULE_ID REPETITIVE_SCHEDULE_ID
, WOR.ORGANIZATION_ID ORGANIZATION_ID
, WOR.OPERATION_SEQ_NUM OPERATION_SEQ_NUM
, WOR.RESOURCE_SEQ_NUM RESOURCE_SEQ_NUM
, WOR.RESOURCE_ID
, BR.RESOURCE_CODE
, BDR.DEPARTMENT_ID
, BD.DEPARTMENT_CODE
, BDR.SHARE_FROM_DEPT_ID
, DECODE(WORU.START_DATE
, NULL
, WOR.START_DATE
, WORU.START_DATE) START_DATE
, DECODE(WORU.COMPLETION_DATE
, NULL
, WOR.COMPLETION_DATE
, WORU.COMPLETION_DATE) COMPLETION_DATE
, DECODE(WORU.ASSIGNED_UNITS
, NULL
, WOR.ASSIGNED_UNITS
, WORU.ASSIGNED_UNITS) ASSIGNED_UNITS
, WOR.SCHEDULED_FLAG
, WORU.INSTANCE_ID
, WORU.SERIAL_NUMBER
, DECODE(WOR.PARENT_RESOURCE_SEQ
, NULL
, 0
, 1) SETUP
, WORU.CUMULATIVE_PROCESSING_TIME
FROM BOM_RESOURCES BR
, BOM_DEPARTMENTS BD
, BOM_DEPARTMENT_RESOURCES BDR
, WIP_OPERATIONS WO
, WIP_OPERATION_RESOURCE_USAGE WORU
, WIP_OPERATION_RESOURCES WOR
WHERE WORU.WIP_ENTITY_ID(+) = WOR.WIP_ENTITY_ID
AND WORU.OPERATION_SEQ_NUM(+) = WOR.OPERATION_SEQ_NUM
AND WORU.RESOURCE_SEQ_NUM(+) = WOR.RESOURCE_SEQ_NUM
AND WORU.ORGANIZATION_ID(+) = WOR.ORGANIZATION_ID
AND NVL(WORU.REPETITIVE_SCHEDULE_ID(+)
, -1) = NVL(WOR.REPETITIVE_SCHEDULE_ID
, -1)
AND WOR.SCHEDULED_FLAG IN (1
, 3
, 4)
AND BD.DEPARTMENT_ID = BDR.DEPARTMENT_ID
AND BDR.DEPARTMENT_ID = WO.DEPARTMENT_ID
AND BR.RESOURCE_ID = BDR.RESOURCE_ID
AND BDR.RESOURCE_ID = WOR.RESOURCE_ID
AND WO.ORGANIZATION_ID = WOR.ORGANIZATION_ID
AND WO.WIP_ENTITY_ID = WOR.WIP_ENTITY_ID
AND WO.OPERATION_SEQ_NUM = WOR.OPERATION_SEQ_NUM
AND NVL(WO.REPETITIVE_SCHEDULE_ID
, -1) = NVL(WOR.REPETITIVE_SCHEDULE_ID
, -1)