The following lines contain the word 'select', 'insert', 'update' or 'delete':
select null
from per_work_incidents inc
,per_people_f per
,hr_organization_information hoi
where inc.incident_id = p_incident_id
and per.person_id = inc.person_id
and hoi.organization_id = per.business_group_id
and hoi.org_information_context||'' = 'Business Group Information';
select pbg.legislation_code
from per_work_incidents inc,
per_people_f per,
per_business_groups pbg
where inc.incident_id = p_incident_id
and inc.person_id = per.person_id
and per.business_group_id = pbg.business_group_id;
Procedure chk_non_updateable_args
(p_effective_date in date
,p_rec in per_inc_shd.g_rec_type ) IS
--
l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
End chk_non_updateable_args;
select null
from per_people_f per
where per.person_id = p_person_id
and p_effective_date between per.effective_start_date
and per.effective_end_date;
SELECT next_value
FROM per_us_osha_numbers
WHERE case_year = p_year
AND business_group_id = p_bg_id
FOR UPDATE OF next_value NOWAIT;
UPDATE per_us_osha_numbers
SET next_value = next_value+1
WHERE CURRENT OF csr_num;
select null
from per_work_incidents pwi
where upper(pwi.incident_reference) = upper(p_incident_reference);
select null
from per_work_incidents pwi
where pwi.incident_id = p_related_incident_id
and pwi.person_id = p_person_id
and pwi.incident_date <= p_incident_date;
select null
from per_all_people_f paf
where paf.person_id = p_person_reported_by
and paf.business_group_id = p_business_group_id
and nvl(p_report_date, paf.effective_start_date)
between paf.effective_start_date and paf.effective_end_date;
select null
from per_all_people_f paf
where paf.person_id = p_notified_hsrep_id
and paf.business_group_id = p_business_group_id
and nvl(p_notified_hsrep_date, paf.effective_start_date)
between paf.effective_start_date and paf.effective_end_date;
select null
from hr_all_organization_units hou
where hou.organization_id = p_notified_rep_org_id
and hou.internal_external_flag = 'EXT'
and hou.business_group_id = p_business_group_id
and nvl(p_notified_rep_date, hou.date_from) between hou.date_from
and nvl(hou.date_to,hr_general.end_of_time)
and p_notified_rep_org_id in (select hoi.organization_id
from hr_organization_information hoi
where hoi.org_information_context = 'CLASS'
and hoi.org_information1 = 'REPBODY'
and hoi.org_information2 = 'Y');
select null
from per_all_people_f paf, per_roles rol
where paf.person_id = p_notified_rep_id
and paf.business_group_id = p_business_group_id
and paf.person_id = rol.person_id
and rol.organization_id = p_notified_rep_org_id
and nvl(p_notified_rep_date, paf.effective_start_date)
between paf.effective_start_date and paf.effective_end_date
and nvl(p_notified_rep_date, rol.start_date)
between rol.start_date and nvl(rol.end_date,hr_general.end_of_time);
select null
from per_all_assignments_f asg
where asg.assignment_id = p_assignment_id
and asg.person_id = p_person_id
and p_incident_date between asg.effective_start_date
and asg.effective_end_date;
Procedure insert_validate
(p_effective_date in date
,p_rec in per_inc_shd.g_rec_type
) is
--
cursor csr_bg is
select business_group_id
from per_all_people_f
where person_id = p_rec.person_id;
l_proc varchar2(72) := g_package||'insert_validate';
End insert_validate;
Procedure update_validate
(p_effective_date in date
,p_rec in per_inc_shd.g_rec_type
) is
--
cursor csr_bg is
select business_group_id
from per_all_people_f
where person_id = p_rec.person_id;
l_proc varchar2(72) := g_package||'update_validate';
chk_non_updateable_args
(p_effective_date => p_effective_date
,p_rec => p_rec);
End update_validate;
Procedure delete_validate
(p_rec in per_inc_shd.g_rec_type
) is
--
l_proc varchar2(72) := g_package||'delete_validate';
End delete_validate;
select incident_reference
from per_work_incidents pwi
where pwi.incident_id = p_incident_id;
select business_group_id
from hr_all_organization_units units
,hr_organization_information org
where units.organization_id = org.organization_id
--and units.type = 'BG'
and mod(business_group_id,p_number_of_workers) = p_current_worker-1
and org.org_information_context = 'Business Group Information'
and org.org_information9 = 'US'
and not exists (select null from per_us_osha_numbers osha
where osha.business_group_id = units.business_group_id
and osha.case_year = 1900
);
l_proc varchar2(72) := g_package||'delete_validate';
insert into per_us_osha_numbers(
case_year,
business_group_id,
next_value,
last_update_date,
last_updated_by,
last_update_login,
created_by,
creation_date)
values (x,
i.business_group_id,
1,
trunc(sysdate),
-1,
0,
-1,
trunc(sysdate)
);