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 hr1.meaning || decode(hr1.meaning,null,null,' ')
|| peo.first_name
|| decode(peo.first_name,null,null,' ')
|| peo.last_name
into v_authorizer_name
from per_all_people_f peo
, hr_lookups hr1
where AUTHORISING_PERSON_ID = peo.person_id
and peo.effective_start_date = (select min(peo2.effective_start_date)
from per_all_people_f peo2
where peo2.person_id = peo.person_id)
and hr1.lookup_type (+) = 'TITLE'
and hr1.lookup_code (+) = peo.title;
select hr1.meaning || decode(hr1.meaning,null,null,' ')
|| peo.first_name
|| decode(peo.first_name,null,null,' ')
|| peo.last_name
into v_replacement_name
from per_all_people_f peo
, hr_lookups hr1
where replacement_PERSON_ID = peo.person_id
and peo.effective_start_date = (select min(peo2.effective_start_date)
from per_all_people_f peo2
where peo2.person_id = peo.person_id )
and hr1.lookup_type (+) = 'TITLE'
and hr1.lookup_code (+) = peo.title;