DBA Data[Home] [Help]

VIEW: APPS.WIP_OP_RES_INSTANCE_USAGE_V

Source

View Text - Preformatted

SELECT wori.wip_entity_id wip_entity_id, to_number(null), wori.organization_id organization_id, wori.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, wori.start_date, woru.start_date) start_date, decode(woru.completion_date, null, wori.completion_date, woru.completion_date) completion_date, 1, wor.scheduled_flag, wori.instance_id instance_id, wori.serial_number serial_number FROM BOM_RESOURCES BR,BOM_DEPARTMENTS BD,BOM_DEPARTMENT_RESOURCES BDR,WIP_OPERATIONS WO,WIP_OPERATION_RESOURCE_USAGE WORU,WIP_OPERATION_RESOURCES WOR,WIP_OP_RESOURCE_INSTANCES WORI where woru.wip_entity_id(+) = wori.wip_entity_id and woru.operation_seq_num(+) = wori.operation_seq_num and woru.resource_seq_num(+) = wori.resource_seq_num and woru.organization_id(+) = wori.organization_id and wor.scheduled_flag in (1,3,4) and wori.wip_entity_id = wor.wip_entity_id and wori.operation_seq_num = wor.operation_seq_num and wori.resource_seq_num = wor.resource_seq_num and woru.instance_id(+) = wori.instance_id and woru.serial_number(+) = wori.serial_number 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 WORI.WIP_ENTITY_ID WIP_ENTITY_ID
, TO_NUMBER(NULL)
, WORI.ORGANIZATION_ID ORGANIZATION_ID
, WORI.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
, WORI.START_DATE
, WORU.START_DATE) START_DATE
, DECODE(WORU.COMPLETION_DATE
, NULL
, WORI.COMPLETION_DATE
, WORU.COMPLETION_DATE) COMPLETION_DATE
, 1
, WOR.SCHEDULED_FLAG
, WORI.INSTANCE_ID INSTANCE_ID
, WORI.SERIAL_NUMBER SERIAL_NUMBER
FROM BOM_RESOURCES BR
, BOM_DEPARTMENTS BD
, BOM_DEPARTMENT_RESOURCES BDR
, WIP_OPERATIONS WO
, WIP_OPERATION_RESOURCE_USAGE WORU
, WIP_OPERATION_RESOURCES WOR
, WIP_OP_RESOURCE_INSTANCES WORI
WHERE WORU.WIP_ENTITY_ID(+) = WORI.WIP_ENTITY_ID
AND WORU.OPERATION_SEQ_NUM(+) = WORI.OPERATION_SEQ_NUM
AND WORU.RESOURCE_SEQ_NUM(+) = WORI.RESOURCE_SEQ_NUM
AND WORU.ORGANIZATION_ID(+) = WORI.ORGANIZATION_ID
AND WOR.SCHEDULED_FLAG IN (1
, 3
, 4)
AND WORI.WIP_ENTITY_ID = WOR.WIP_ENTITY_ID
AND WORI.OPERATION_SEQ_NUM = WOR.OPERATION_SEQ_NUM
AND WORI.RESOURCE_SEQ_NUM = WOR.RESOURCE_SEQ_NUM
AND WORU.INSTANCE_ID(+) = WORI.INSTANCE_ID
AND WORU.SERIAL_NUMBER(+) = WORI.SERIAL_NUMBER
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)