The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT wip_entity_name,
entity_type
INTO x_entity_name,
x_entity_type
FROM wip_entities
WHERE wip_entity_id = x_entity_id
AND organization_id = x_dest_org_id;
SELECT line_code
INTO x_wip_line_code
FROM wip_lines
WHERE line_id = x_line_id
AND organization_id = x_dest_org_id;
SELECT department_code, operation_code
INTO x_bom_department_code, x_wip_operation_code
FROM wip_osp_operations_val_v
WHERE organization_id = x_dest_org_id
AND operation_seq_num = x_wip_operation_seq_num
AND wip_entity_id = x_entity_id
AND x_wip_repetitive_schedule_id is null;
SELECT department_code, operation_code
INTO x_bom_department_code, x_wip_operation_code
FROM wip_osp_operations_val_v
WHERE organization_id = x_dest_org_id
AND operation_seq_num = x_wip_operation_seq_num
AND wip_entity_id = x_entity_id
AND x_wip_repetitive_schedule_id is not null
AND repetitive_schedule_id = x_wip_repetitive_schedule_id;
SELECT resource_code,
unit_of_measure,
cost_element_id
INTO x_bom_resource_code,
x_bom_resource_unit,
x_bom_cost_element_id
FROM bom_resources
WHERE resource_id = x_bom_resource_id
AND organization_id = x_dest_org_id;
SELECT usage_rate_or_amount,
decode(x_outside_op_uom_type,
'ASSEMBLY',x_quantity_ordered,
'RESOURCE',x_quantity_ordered /
decode(wor.usage_rate_or_amount,
0,x_quantity_ordered,
wor.usage_rate_or_amount)
),
decode(x_outside_op_uom_type,
'ASSEMBLY', x_quantity_ordered
* wor.usage_rate_or_amount,
'RESOURCE', x_quantity_ordered)
INTO x_usage_rate_or_amount,
x_assembly_quantity,
x_resource_quantity
FROM wip_operation_resources wor
WHERE wor.wip_entity_id = x_entity_id
AND nvl(wor.repetitive_schedule_id,-1) =
nvl(x_wip_repetitive_schedule_id,-1)
AND wor.operation_seq_num = x_wip_operation_seq_num
AND wor.resource_seq_num = x_wip_resource_seq_num
AND wor.organization_id = x_dest_org_id;
SELECT displayed_field
INTO x_op_uom_type
FROM po_lookup_codes
WHERE lookup_type = 'OUTSIDE OPERATION UOM TYPE'
AND lookup_code = x_op_uom_type_dsp;
select project_number
into x_project
from pjm_projects_all_ou_v --< Bug 3265539 >
where project_id = x_project_id;
select task_number
into x_task
from pa_tasks --< Bug 3265539 >
where task_id = x_task_id and
project_id = x_project_id;
select segment1
from pa_projects_all
where project_id = X_project_id
union
select project_number
from pjm_seiban_numbers
where project_id = X_project_id;