The following lines contain the word 'select', 'insert', 'update' or 'delete':
select peo.first_name ||
decode(peo.first_name,null,null,' ') ||
peo.last_name
into v_name
from per_all_people_f peo
where peo.person_id = p_person_id
and p_session_date between peo.effective_start_date
and peo.effective_end_date;
select PBG.LEGISLATION_CODE
into v_legislation_code
from PER_BUSINESS_GROUPS PBG
where PBG.BUSINESS_GROUP_ID = p_business_group_id;
select PBG.COST_ALLOCATION_STRUCTURE
into v_id_flex_num
from PER_BUSINESS_GROUPS PBG
where PBG.BUSINESS_GROUP_ID = p_business_group_id;
select rule_mode
into v_id_flex_num
from pay_legislation_rules
where legislation_code = v_legislation_code
and rule_type = 'S'
and exists
(select null
from FND_SEGMENT_ATTRIBUTE_VALUES
where ID_FLEX_NUM = rule_mode
and APPLICATION_ID = 800
and ID_FLEX_CODE = 'SCL'
and SEGMENT_ATTRIBUTE_TYPE = 'ASSIGNMENT'
and ATTRIBUTE_VALUE = 'Y');
select rule_type into p_town_of_birth
from pay_legislative_field_info
where field_name = 'TOWN_OF_BIRTH'
and legislation_code = v_legislation_code;
select rule_type into p_region_of_birth
from pay_legislative_field_info
where field_name = 'REGION_OF_BIRTH'
and legislation_code = v_legislation_code;