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 org_information10
into c_currency_code
from hr_organization_information
where organization_id = p_business_group_id
and org_information_context = 'Business Group Information';
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 TO_NUMBER(l.rule_mode)
into v_id_flex_num
from pay_legislation_rules l
where l.legislation_code = territory_code
and l.rule_type = 'E';
select count(*)
into v_detailcount
from per_periods_of_service pps,
per_all_people_f peo
where pps.person_id = p_person_id
and pps.business_group_id = p_business_group_id
and pps.termination_accepted_person_id = peo.person_id(+)
and pps.actual_termination_date between peo.effective_start_date(+)
and peo.effective_end_date(+);
select count(*)
into v_detailcount
from per_all_assignments_f asg,
per_all_people_f peo
where asg.supervisor_id = peo.person_id(+)
and asg.effective_start_date between peo.effective_start_date(+)
and peo.effective_end_date(+)
and asg.business_group_id = p_business_group_id
and asg.person_id = p_person_id;
select count(*)
into v_detailcount
from per_secondary_ass_statuses ast,
per_all_assignments_f pa
where ast.assignment_id = pa.assignment_id
and pa.person_id = p_person_id
and pa.business_group_id = p_business_group_id;
select count(*)
into v_detailcount
from per_spinal_point_placements_f pssp,
per_all_assignments_f pa
where pssp.assignment_id = pa.assignment_id
and pa.person_id = p_person_id
and pa.business_group_id = p_business_group_id;