The following lines contain the word 'select', 'insert', 'update' or 'delete':
select inventory_item_id, serial_number_control_code
into l_dummy_num, l_serial_control_code
from mtl_system_items_b msi, mtl_parameters mp
where msi.inventory_item_id = p_rebuild_item_id
and msi.organization_id = mp.organization_id
and mp.maint_organization_id = p_organization_id
and eam_item_type = 3
and rownum = 1;
select inventory_item_id, serial_number_control_code
into p_rebuild_item_id, l_serial_control_code
from mtl_system_items_b_kfv msi, mtl_parameters mp
where msi.concatenated_segments = p_rebuild_item_name
and msi.organization_id = mp.organization_id
and mp.maint_organization_id = p_organization_id
and eam_item_type = 3
and rownum = 1;
select serial_number, current_status, gen_object_id, current_organization_id
into l_dummy_char, l_current_status, l_object_id, l_cur_organization_id
from mtl_serial_numbers msn, mtl_parameters mp
where inventory_item_id = p_rebuild_item_id
and current_organization_id = mp.organization_id
and mp.maint_organization_id = p_organization_id
and serial_number = p_rebuild_serial_number;
select msn.gen_object_id into l_parent_object_id
from wip_discrete_jobs wdj, mtl_serial_numbers msn, csi_item_instances cii
where wdj.wip_entity_id = p_wip_entity_id
and wdj.maintenance_object_id = cii.instance_id
and wdj.maintenance_object_type = 3
and cii.serial_number = msn.serial_number
and cii.inventory_item_id = msn.inventory_item_id
and cii.last_vld_organization_id = msn.current_organization_id;
select object_id into l_dummy_num
from mtl_object_genealogy
where object_id = l_object_id
and parent_object_id = l_parent_object_id
and start_date_active <= sysdate
and (end_date_active is null or end_date_active >= sysdate);
select inventory_item_id into l_dummy_num
from mtl_system_items_b_kfv
where inventory_item_id = p_rebuild_activity_id
and organization_id = p_organization_id
and eam_item_type = 2;
select inventory_item_id into p_rebuild_activity_id
from mtl_system_items_b_kfv
where concatenated_segments = p_rebuild_activity_name
and organization_id = p_organization_id
and eam_item_type = 2;
select meaa.activity_association_id into l_dummy_num
from mtl_eam_asset_activities meaa, eam_org_maint_defaults eomd, csi_item_instances cii
where ( meaa.end_date_active is null or meaa.end_date_active > sysdate)
and (meaa.start_date_active is null or meaa.start_date_active < sysdate)
and meaa.asset_activity_id = p_rebuild_activity_id
and nvl(meaa.tmpl_flag, 'N') = 'N'
and eomd.organization_id = p_organization_id
and eomd.object_type = 60
and eomd.object_id = meaa.activity_association_id
and cii.inventory_item_id = p_rebuild_item_id
and cii.serial_number = p_rebuild_serial_number
and meaa.maintenance_object_type = 3
and meaa.maintenance_object_id = cii.instance_id;
select meaa.activity_association_id into l_dummy_num
from mtl_eam_asset_activities meaa, eam_org_maint_defaults eomd
where ( meaa.end_date_active is null or meaa.end_date_active > sysdate)
and (meaa.start_date_active is null or meaa.start_date_active < sysdate)
and meaa.asset_activity_id = p_rebuild_activity_id
and meaa.maintenance_object_type = 2
and meaa.maintenance_object_id = p_rebuild_item_id
and eomd.organization_id = p_organization_id
and eomd.object_type = 40
and eomd.object_id = meaa.activity_association_id;