The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT pds.PERIOD_OF_SERVICE_ID,
pds.pds_information2,
l.lookup_code,
p.employee_number,
p.full_name,
pds.date_start
FROM per_periods_of_service pds
, per_all_people_f p
, hr_lookups l
WHERE pds.business_group_id = p_business_group_id
AND pds.pds_information2 is not null
AND pds.leaving_reason is null
and l.lookup_type(+) = 'LEAV_REAS'
and l.lookup_code(+) = pds.pds_information2
and pds.person_id = p.person_id
AND pds.date_start between
p.effective_start_date and p.effective_end_date
order by p.full_name,pds.date_start;
BEGIN -- Update termination record
hr_utility.set_location(l_proc,10);
SAVEPOINT start_insert;
update per_periods_of_service
set leaving_reason = pds_information2
, pds_information2 = null
where period_of_service_id = l_pds.period_of_service_id;
rollback to start_insert;