The following lines contain the word 'select', 'insert', 'update' or 'delete':
select count ( ecs_self.change_id )
into ofcount
from eng_change_subjects ecs_self, eng_engineering_changes eec
where ecs_self.change_id = eec.change_id
and ecs_self.entity_name = self_entity_name
and ecs_self.pk1_value = self_pk1_value
and ecs_self.subject_level = 1
and eec.organization_id = -1
and eec.status_type = 1
and eec.change_mgmt_type_code = findings_category
and exists ( select change_id from eng_change_subjects ecs_par1
where ecs_par1.change_id = ecs_self.change_id
and ecs_par1.entity_name = nvl ( parent1_entity_name, self_entity_name )
and ecs_par1.pk1_value = nvl ( parent1_pk1_value, self_pk1_value )
and ecs_par1.subject_level = decode ( parent1_entity_name, NULL, 1, 2 ) )
and exists ( select change_id from eng_change_subjects ecs_par2
where ecs_par2.change_id = ecs_self.change_id
and ecs_par2.entity_name = nvl ( parent2_entity_name, self_entity_name )
and ecs_par2.pk1_value = nvl ( parent2_pk1_value, self_pk1_value )
and ecs_par2.subject_level = decode ( parent2_entity_name, NULL, 1, 3 ) )
and exists ( select change_id from eng_change_subjects ecs_par3
where ecs_par3.change_id = ecs_self.change_id
and ecs_par3.entity_name = nvl ( parent3_entity_name, self_entity_name )
and ecs_par3.pk1_value = nvl ( parent3_pk1_value, self_pk1_value )
and ecs_par3.subject_level = decode ( parent3_entity_name, NULL, 1, 4 ) )
and exists ( select change_id from eng_change_subjects ecs_par4
where ecs_par4.change_id = ecs_self.change_id
and ecs_par4.entity_name = nvl ( parent4_entity_name, self_entity_name )
and ecs_par4.pk1_value = nvl ( parent4_pk1_value, self_pk1_value )
and ecs_par4.subject_level = decode ( parent4_entity_name, NULL, 1, 5 ) );
select responsibility_key
into respkey
from fnd_responsibility_vl
where responsibility_id = fnd_global.resp_id()
and application_id = fnd_global.resp_appl_id();