The following lines contain the word 'select', 'insert', 'update' or 'delete':
select 'x'
from per_job_definitions
where job_definition_id = p_job_definition_id;
select 'x'
from per_jobs
where job_definition_id = p_job_definition_id
and business_group_id + 0 = p_business_group_id;
Procedure insert_validate(p_rec in per_job_shd.g_rec_type) is
--
l_proc varchar2(72) := g_package||'insert_validate';
End insert_validate;
Procedure update_validate(p_rec in per_job_shd.g_rec_type) is
--
l_proc varchar2(72) := g_package||'update_validate';
chk_non_updateable_args
(p_date_from => p_rec.date_from
,p_rec => p_rec);
End update_validate;
Procedure delete_validate(p_rec in per_job_shd.g_rec_type) is
--
cursor csr_bg is select business_group_id from per_jobs
where job_id = p_rec.job_id;
l_proc varchar2(72) := g_package||'delete_validate';
per_job_bus.check_delete_record
(p_job_id => p_rec.job_id
,p_business_group_id => l_business_group_id);
End delete_validate;
select pbg.legislation_code
from per_business_groups pbg
, per_jobs job
where job.job_id = p_job_id
and pbg.business_group_id = job.business_group_id;
Procedure chk_non_updateable_args
(p_date_from in date
,p_rec in per_job_shd.g_rec_type
) IS
--
l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
End chk_non_updateable_args;
select job_group_id
from per_job_groups
where job_group_id = p_job_group_id
and (business_group_id is null
or business_group_id = p_business_group_id);
select 1
from per_jobs
--
-- Bug 3213738
-- Changed where clause to filter based on benchmark_job_id
-- and relaxed check on business group.
--
where job_id = p_benchmark_job_id
and p_benchmark_job_id <> nvl(p_job_id,hr_api.g_number)
and benchmark_job_flag = 'Y';
cursor csr_name is select null
from per_jobs j
where ((p_job_id is not null
and j.job_id <> p_job_id)
or p_job_id is null)
and j.business_group_id + 0 = p_business_group_id
and j.name = p_name;
cursor csr_date_from is select null
from per_valid_grades vg
where vg.job_id = p_job_id
and p_date_from > vg.date_from;
cursor csr_date_to is select null
from per_valid_grades vg
where vg.business_group_id + 0 = p_business_group_id
and vg.job_id = p_job_id
and nvl(vg.date_to, p_end_of_time) > p_date_to;
cursor csr_date_from is select null
from per_valid_grades vg
where vg.business_group_id + 0 = p_business_group_id
and vg.job_id = p_job_id
and vg.date_from > p_date_to;
procedure check_delete_record(p_job_id number,
p_business_group_id number) is
--
-- Changed 01-Oct-99 SCNair (per_all_positions to hr_all_positions_f) date track
-- requirement
--
cursor csr_position is select null
from hr_all_positions_f pst1
where pst1.job_id = p_job_id;
cursor csr_assignment is select null
from per_all_assignments_f a
where a.job_id = p_job_id
and a.job_id is not null;
cursor csr_grade is select null
from per_valid_grades vg1
where vg1.business_group_id + 0 = p_business_group_id
and vg1.job_id = p_job_id;
cursor csr_requirement is select null
from per_job_requirements jre1
where jre1.job_id = p_job_id;
cursor csr_evaluation is select null
from per_job_evaluations jev1
where jev1.job_id = p_job_id;
cursor csr_elementp is select null
from per_career_path_elements cpe1
where cpe1.parent_job_id = p_job_id;
cursor csr_elements is select null
from per_career_path_elements cpe1
where cpe1.subordinate_job_id = p_job_id;
cursor csr_budget is select null
from per_budget_elements bde1
where bde1.job_id = p_job_id
and bde1.job_id is not null;
cursor csr_vacancy is select null
from per_vacancies vac
where vac.job_id = p_job_id
and vac.job_id is not null;
cursor csr_link is select null
from pay_element_links_f eln
where eln.job_id = p_job_id
and eln.job_id is not null;
cursor csr_role is select null
from per_roles rol
where rol.job_id = p_job_id
and rol.job_id is not null;
l_proc varchar2(72) := g_package||'check_delete_record';
l_sql_text := 'select null '
||'from sys.dual '
||'where exists( select null '
||' from po_position_controls_all '
||' where job_id = '
||to_char(p_job_id)
||' ) ';
end check_delete_record;
select jbe.job_evaluation_id,
jbe.date_evaluated
from per_job_evaluations jbe
where jbe.job_id = csr_job_evaluations.p_job_id;