The following lines contain the word 'select', 'insert', 'update' or 'delete':
select to_number(pgr1.value),
to_number(pgr2.value)
from pay_grade_rules_f pgr1,
pay_grade_rules_f pgr2
where pgr1.grade_or_spinal_point_id = l_old_spinal_point_id
and pgr2.grade_or_spinal_point_id = l_new_spinal_point_id
and pgr1.rate_type = 'SP'
and pgr2.rate_type = 'SP'
and pgr1.rate_id = (select min(rate_id)
from pay_grade_rules_f pgr3
where pgr1.grade_or_spinal_point_id = pgr3.grade_or_spinal_point_id
and pgr3.rate_type = 'SP'
and (p_rate_id is null
or p_rate_id = pgr3.rate_id))
and pgr2.rate_id = (select min(rate_id)
from pay_grade_rules_f pgr4
where pgr2.grade_or_spinal_point_id = pgr4.grade_or_spinal_point_id
and pgr4.rate_type = 'SP'
and (p_rate_id is null
or p_rate_id = pgr4.rate_id))
and p_effective_date between pgr2.effective_start_date
and pgr2.effective_end_date
and (p_effective_date - 1) between pgr1.effective_start_date
and pgr1.effective_end_date;
select distinct substr(pap.full_name,1,60) ,paa.assignment_number,substr(org.name,1,60)
into l_full_name ,l_assignment_number,l_org_name
from per_all_people_f pap,
per_all_assignments_f paa,
hr_all_organization_units org
where pap.person_id = paa.person_id
and paa.organization_id = org.organization_id
and paa.assignment_id = p_assignment_id
and p_effective_date between paa.effective_start_date
and paa.effective_end_date
and p_effective_date between pap.effective_start_date -- 2276901
and pap.effective_end_date; -- 2276901
select substr(pps.name,1,30)
into l_pay_scale
from per_parent_spines pps
where pps.parent_spine_id = p_parent_spine_id;
select substr(pg.name,1,30)
into l_grade_name
from per_grades_vl pg,
per_spinal_point_steps_f sps,
per_grade_spines_f pgs
where pg.grade_id = pgs.grade_id
and pgs.grade_spine_id = sps.grade_spine_id
and sps.step_id = p_step_id
and p_effective_date between sps.effective_start_date -- 2276901
and sps.effective_end_date -- 2276901
and p_effective_date between pgs.effective_start_date -- 2276901
and pgs.effective_end_date; -- 2276901
select min(effective_start_date)
into l_effective_start_date
from per_spinal_point_placements_f
where placement_id = p_placement_id;
select substr(psp.spinal_point,1,30),
psp.spinal_point_id
into l_new_spinal_point,
l_new_spinal_point_id
from per_spinal_points psp,
per_spinal_point_steps_f sps
where psp.spinal_point_id = sps.spinal_point_id
and sps.step_id = p_step_id
and p_effective_date between sps.effective_start_date
and sps.effective_end_date;
select substr(psp1.spinal_point,1,30),
substr(psp2.spinal_point,1,30),
psp1.spinal_point_id,
psp2.spinal_point_id
into l_old_spinal_point,
l_new_spinal_point,
l_old_spinal_point_id,
l_new_spinal_point_id
from per_spinal_points psp1,
per_spinal_points psp2,
per_spinal_point_placements_f spp,
per_spinal_point_steps_f sps1,
per_spinal_point_steps_f sps2
where psp1.spinal_point_id = sps1.spinal_point_id
and psp2.spinal_point_id = sps2.spinal_point_id
and sps2.step_id = p_step_id
and sps1.step_id = spp.step_id
and spp.placement_id = p_placement_id
and spp.effective_end_date = p_effective_date - 1
and p_effective_date between sps1.effective_start_date
and sps1.effective_end_date
and p_effective_date between sps2.effective_start_date
and sps2.effective_end_date;