The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT ppf.full_name
FROM per_people_f ppf
WHERE ppf.person_id = cp_supervisor_id
AND cp_effective_date BETWEEN ppf.effective_start_date
AND ppf.effective_end_date;
SELECT htb.start_time, htb.stop_time
FROM hxc_timecard_summary htb
WHERE htb.resource_id = cp_resource_id
AND cp_period_start <= htb.stop_time
AND cp_period_end >= htb.start_time;
SELECT 'x'
FROM DUAL
WHERE EXISTS (
SELECT 'x'
FROM hxc_timecard_summary htb
WHERE htb.resource_id = cp_resource_id
AND cp_period_start <= htb.stop_time
AND cp_period_end >= htb.start_time);
SELECT count(*)
INTO l_cnt
FROM per_person_types ppt,
per_person_type_usages_f ptu,
per_people_f per
WHERE per.person_id = p_resource_id
AND ptu.person_id = per.person_id
AND ptu.person_type_id = ppt.person_type_id
-- AND ppt.system_person_type NOT IN ('EMP', 'EMP_APL', 'CWK') -- Bug 6486974
-- AND per.effective_start_date <= p_end_date
-- AND per.effective_end_date >= p_start_date;
hr_utility.TRACE ('Deleted PL/SQL table');
g_time_periods.DELETE;
select min(ppf.effective_start_date), max(ppf.effective_end_date)
into l_p_start_date, l_p_end_date
from per_people_f ppf, per_assignments_f paf
where ppf.person_id = p_resource_id
and paf.person_id = ppf.person_id
and paf.assignment_id = p_assignment_id
and paf.effective_start_date between ppf.effective_start_date
and ppf.effective_end_date;
/* select min(ppf.effective_start_date), max(ppf.effective_end_date)
into l_p_start_date, l_p_end_date
from per_people_f ppf,
per_assignments_f paf,
per_person_types ppt,
per_person_type_usages_f ptu
where ppf.person_id = p_resource_id
and paf.person_id = ppf.person_id
and ptu.person_id = ppf.person_id
and ptu.person_type_id=ppt.person_type_id
and ppt.system_person_type in ('EMP','EMP_APL','CWK')
and paf.assignment_id = p_assignment_id
and paf.effective_start_date between ppf.effective_start_date
and ppf.effective_end_date
and ppf.effective_start_date between ptu.effective_start_date
and ptu.effective_end_date;
SELECT
min(per.effective_start_date),
max(per.effective_end_date)
INTO
l_p_start_date, l_p_end_date
FROM
per_person_types ppt,
per_people_f per
WHERE
per.person_id = p_resource_id
AND ppt.person_type_id = per.person_type_id
AND ppt.system_person_type in ('EMP','EMP_APL','CWK')
AND per.effective_start_date =
(select min(perMin.effective_start_date)
from per_people_f perMin
where perMin.person_id = per.person_id
AND perMin.effective_start_date <= p_end_date
AND perMin.effective_end_date >= p_start_date)
AND EXISTS ( SELECT 'x'
FROM per_assignment_status_types ast,
per_assignments_f asm
WHERE asm.person_id = per.person_id
AND asm.primary_flag = 'Y'
AND
(
asm.effective_start_date <= per.effective_end_date
AND
asm.effective_end_date >= per.effective_start_date
)
AND ast.assignment_status_type_id
= asm.assignment_status_type_id
AND ast.pay_system_status = 'P' );
SELECT MIN (per.effective_start_date), MAX (per.effective_end_date)
INTO l_p_start_date, l_p_end_date
FROM per_person_type_usages_f ptu,
per_person_types ppt,
per_people_f per
WHERE per.person_id = p_resource_id
AND ptu.person_id = per.person_id
AND ptu.person_type_id = ppt.person_type_id
AND ppt.system_person_type IN ('EMP', 'EMP_APL', 'CWK')
AND (per.effective_start_date =
(SELECT MIN (permin.effective_start_date)
FROM per_people_f permin
WHERE permin.person_id = per.person_id
AND permin.effective_start_date <= p_end_date
AND permin.effective_end_date >= p_start_date)
OR
per.effective_start_date =
(SELECT MAX(permin.effective_start_date)
FROM per_people_f permin
WHERE permin.person_id = per.person_id
AND permin.effective_start_date <= p_end_date
AND permin.effective_end_date >= p_start_date)
)
AND EXISTS (
SELECT 'x'
FROM per_assignment_status_types ast,
per_assignments_f asm
WHERE asm.person_id = per.person_id
AND asm.primary_flag = 'Y'
AND ( asm.effective_start_date <=
per.effective_end_date
AND asm.effective_end_date >=
per.effective_start_date
)
AND ast.assignment_status_type_id =
asm.assignment_status_type_id
AND NVL (ast.pay_system_status, 'P') =
DECODE (ast.per_system_status,
'ACTIVE_CWK', 'D',
'P'
));
SELECT hrp.recurring_period_id, hrp.start_date, hrp.end_date,
hrp.period_type, hrp.duration_in_days
INTO l_recurring_period_id, l_start_date, l_end_date,
l_period_type, l_duration_in_days
FROM hxc_recurring_periods hrp
WHERE hrp.recurring_period_id = l_pref_tc_period;
hr_utility.TRACE ('in else for Deleted PL/SQL table');
hr_utility.TRACE ('Deleted PL/SQL table');
g_time_periods.DELETE;
SELECT 'Y'
FROM hxc_data_sets
WHERE status IN
('OFF_LINE', 'BACKUP_IN_PROGRESS', 'RESTORE_IN_PROGRESS')
AND TRUNC (p_date) BETWEEN start_date AND end_date;