DBA Data[Home] [Help]

VIEW: APPS.WIP_OP_RESOURCE_INSTANCES_V

Source

View Text - Preformatted

SELECT wori.wip_entity_id, wori.operation_seq_num, wori.resource_seq_num, wori.organization_id, wori.last_update_date, wori.last_updated_by, wori.creation_date, wori.created_by, wori.last_update_login, wori.instance_id, wori.serial_number, wor.resource_id, br.resource_type, msik.concatenated_segments "instance_name", msik.description, to_date(null), to_date(null), wori.start_date, wori.completion_date, wori.rowid row_id, wori.batch_id from wip_op_resource_instances wori, wip_operation_resources wor, bom_resources br, bom_resource_equipments breq, mtl_system_items_kfv msik where wor.wip_entity_id = wori.wip_entity_id and wor.organization_id = wori.organization_id and wor.operation_seq_num = wori.operation_seq_num and wor.resource_seq_num = wori.resource_seq_num and br.resource_id = wor.resource_id and br.resource_type =1 and breq.instance_id = wori.instance_id and msik.inventory_item_id = breq.inventory_item_id and msik.organization_id = breq.organization_id UNION select wori.wip_entity_id, wori.operation_seq_num, wori.resource_seq_num, wori.organization_id, wori.last_update_date, wori.last_updated_by, wori.creation_date, wori.created_by, wori.last_update_login, wori.instance_id, wori.serial_number, wor.resource_id, br.resource_type, papf.full_name "instance_name", to_char(null), brem.effective_start_date, brem.effective_end_date, wori.start_date, wori.completion_date, wori.rowid row_id, wori.batch_id from wip_op_resource_instances wori, wip_operation_resources wor, bom_resources br, bom_resource_employees brem, per_all_people_f papf where wor.wip_entity_id = wori.wip_entity_id and wor.organization_id = wori.organization_id and wor.operation_seq_num = wori.operation_seq_num and wor.resource_seq_num = wori.resource_seq_num and br.resource_id = wor.resource_id and br.resource_type = 2 and brem.instance_id = wori.instance_id and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date and papf.person_id = brem.person_id
View Text - HTML Formatted

SELECT WORI.WIP_ENTITY_ID
, WORI.OPERATION_SEQ_NUM
, WORI.RESOURCE_SEQ_NUM
, WORI.ORGANIZATION_ID
, WORI.LAST_UPDATE_DATE
, WORI.LAST_UPDATED_BY
, WORI.CREATION_DATE
, WORI.CREATED_BY
, WORI.LAST_UPDATE_LOGIN
, WORI.INSTANCE_ID
, WORI.SERIAL_NUMBER
, WOR.RESOURCE_ID
, BR.RESOURCE_TYPE
, MSIK.CONCATENATED_SEGMENTS "INSTANCE_NAME"
, MSIK.DESCRIPTION
, TO_DATE(NULL)
, TO_DATE(NULL)
, WORI.START_DATE
, WORI.COMPLETION_DATE
, WORI.ROWID ROW_ID
, WORI.BATCH_ID
FROM WIP_OP_RESOURCE_INSTANCES WORI
, WIP_OPERATION_RESOURCES WOR
, BOM_RESOURCES BR
, BOM_RESOURCE_EQUIPMENTS BREQ
, MTL_SYSTEM_ITEMS_KFV MSIK
WHERE WOR.WIP_ENTITY_ID = WORI.WIP_ENTITY_ID
AND WOR.ORGANIZATION_ID = WORI.ORGANIZATION_ID
AND WOR.OPERATION_SEQ_NUM = WORI.OPERATION_SEQ_NUM
AND WOR.RESOURCE_SEQ_NUM = WORI.RESOURCE_SEQ_NUM
AND BR.RESOURCE_ID = WOR.RESOURCE_ID
AND BR.RESOURCE_TYPE =1
AND BREQ.INSTANCE_ID = WORI.INSTANCE_ID
AND MSIK.INVENTORY_ITEM_ID = BREQ.INVENTORY_ITEM_ID
AND MSIK.ORGANIZATION_ID = BREQ.ORGANIZATION_ID UNION SELECT WORI.WIP_ENTITY_ID
, WORI.OPERATION_SEQ_NUM
, WORI.RESOURCE_SEQ_NUM
, WORI.ORGANIZATION_ID
, WORI.LAST_UPDATE_DATE
, WORI.LAST_UPDATED_BY
, WORI.CREATION_DATE
, WORI.CREATED_BY
, WORI.LAST_UPDATE_LOGIN
, WORI.INSTANCE_ID
, WORI.SERIAL_NUMBER
, WOR.RESOURCE_ID
, BR.RESOURCE_TYPE
, PAPF.FULL_NAME "INSTANCE_NAME"
, TO_CHAR(NULL)
, BREM.EFFECTIVE_START_DATE
, BREM.EFFECTIVE_END_DATE
, WORI.START_DATE
, WORI.COMPLETION_DATE
, WORI.ROWID ROW_ID
, WORI.BATCH_ID
FROM WIP_OP_RESOURCE_INSTANCES WORI
, WIP_OPERATION_RESOURCES WOR
, BOM_RESOURCES BR
, BOM_RESOURCE_EMPLOYEES BREM
, PER_ALL_PEOPLE_F PAPF
WHERE WOR.WIP_ENTITY_ID = WORI.WIP_ENTITY_ID
AND WOR.ORGANIZATION_ID = WORI.ORGANIZATION_ID
AND WOR.OPERATION_SEQ_NUM = WORI.OPERATION_SEQ_NUM
AND WOR.RESOURCE_SEQ_NUM = WORI.RESOURCE_SEQ_NUM
AND BR.RESOURCE_ID = WOR.RESOURCE_ID
AND BR.RESOURCE_TYPE = 2
AND BREM.INSTANCE_ID = WORI.INSTANCE_ID
AND TRUNC(SYSDATE) BETWEEN PAPF.EFFECTIVE_START_DATE
AND PAPF.EFFECTIVE_END_DATE
AND PAPF.PERSON_ID = BREM.PERSON_ID