The following lines contain the word 'select', 'insert', 'update' or 'delete':
select business_group_id
from per_assignments_f
where assignment_id = p_assignment_id
and p_effective_date between effective_start_date and
effective_end_date;
select null
from pay_us_emp_fed_tax_rules_f
where assignment_id = p_assignment_id
and p_effective_date between effective_start_date and
effective_end_date;
select state_code
from pay_us_states
where state_code = p_state_code;
select county_code
from pay_us_counties
where state_code = p_state_code
and county_code = p_county_code;
select school_dst_code from pay_us_county_school_dsts
where state_code = p_sta_code
and county_code = p_cnt_code
and school_dst_code = p_sch_dst_code;
select school_district_code
from pay_us_emp_city_tax_rules_f ctr
where ctr.assignment_id = p_asg_id
and ctr.effective_end_date >= p_val_start_date
and ctr.effective_start_date <= p_val_end_date
and ctr.school_district_code is not null
and ctr.state_code = p_sta_code
and ctr.county_code = p_cnt_code;
select school_district_code
from pay_us_emp_county_tax_rules_f ctr
where ctr.assignment_id = p_asg_id
and ctr.effective_end_date >= p_validation_start_date
and ctr.effective_start_date <= p_validation_end_date
and ctr.school_district_code is not null
and ctr.state_code = p_sta_code
and ctr.county_code = p_cnt_code
and ctr.emp_county_tax_rule_id <>
NVL(p_tax_rules_id, ctr.emp_county_tax_rule_id);
Procedure chk_non_updateable_args
(p_rec in pay_cnt_shd.g_rec_type,
p_effective_date in date
) is
--
l_proc varchar2(72) := g_package||'chk_non_updateable_args';
end chk_non_updateable_args;
procedure chk_delete
(p_effective_date in date,
p_assignment_id in per_assignments_f.assignment_id%TYPE,
p_state_code in pay_us_emp_county_tax_rules_f.state_code%TYPE,
p_county_code in pay_us_emp_county_tax_rules_f.county_code%TYPE,
p_delete_mode in varchar2,
p_delete_routine in varchar2 default null
)
is
--
l_proc varchar2(72) := g_package||'chk_delete';
select prr.run_result_id from
pay_run_results prr,
pay_assignment_actions paa,
per_assignments_f paf --Bug 3419781
where paf.assignment_id = p_assignment_id --Bug 3419781
and paf.assignment_id = paa.assignment_id
and prr.assignment_action_id = paa.assignment_action_id
and substr(prr.jurisdiction_code,1,6)=p_state_code||'-'||p_county_code
and exists (select null
from pay_payroll_actions ppa,
pay_payrolls_f ppf --Bug 3419781
where ppa.payroll_action_id = paa.payroll_action_id
and ppa.action_type in ('Q','R')
and ppa.date_earned > p_csr_tmp_date
and ppa.payroll_id = ppf.payroll_id --Bug 3419781
and ppa.effective_date between ppf.effective_start_date
and ppf.effective_end_date
and ppf.payroll_id > 0
and ppf.payroll_id = paf.payroll_id
);
select hrl.location_id
from per_assignments_f paf,
hr_locations hrl
where paf.assignment_id = p_assignment_id
and hrl.location_id = paf.location_id
and paf.effective_end_date > p_csr_tmp_date
and exists (select null
from pay_us_states pus,
pay_us_counties puc
where pus.state_abbrev = hrl.region_2
and pus.state_code = p_state_code
and puc.state_code = pus.state_code
and puc.county_name = hrl.region_1
and puc.county_code = p_county_code);
select 1
from per_assignments_f paf,
per_addresses pa
where paf.assignment_id = p_assignment_id
and pa.person_id = paf.person_id
and pa.primary_flag = 'Y'
and nvl(pa.date_to, hr_api.g_eot) > p_csr_tmp_date
and exists (select null
from pay_us_states pus,
pay_us_counties puco
where pus.state_abbrev = pa.region_2
and pus.state_code = p_state_code
and puco.state_code = pus.state_code
and puco.county_name = pa.region_1
and puco.county_code = p_county_code);
select null
from pay_us_emp_city_tax_rules_f cty
where cty.assignment_id = p_assignment_id
and cty.state_code = p_state_code
and cty.county_code = p_county_code
and cty.effective_end_date > p_effective_date;
if nvl(p_delete_mode,hr_api.g_varchar2) in ('ZAP','DELETE') then
hr_utility.set_location(l_proc, 10);
if p_delete_mode = hr_api.g_zap then
l_effective_date := trunc(hr_api.g_sot);
hr_utility.set_message(801,'PAY_52235_TAX_RULE_DELETE');
if nvl(p_delete_mode,hr_api.g_varchar2) = 'ZAP'
and nvl(p_delete_routine,hr_api.g_varchar2)
<> 'ASSIGNMENT' then
hr_utility.set_location(l_proc, 15);
if nvl(p_delete_mode,hr_api.g_varchar2) <> 'ZAP'
and nvl(p_delete_routine,hr_api.g_varchar2)
<> 'ASSIGNMENT' then
hr_utility.set_message(801,'PAY_52971_TAX_ZAP_ONLY');
end chk_delete;
Procedure dt_update_validate
(
p_datetrack_mode in varchar2,
p_validation_start_date in date,
p_validation_end_date in date) Is
--
l_proc varchar2(72) := g_package||'dt_update_validate';
End dt_update_validate;
Procedure dt_delete_validate
(p_emp_county_tax_rule_id in number,
p_datetrack_mode in varchar2,
p_validation_start_date in date,
p_validation_end_date in date) Is
--
l_proc varchar2(72) := g_package||'dt_delete_validate';
If (p_datetrack_mode = 'DELETE' or
p_datetrack_mode = 'ZAP') then
--
--
-- Ensure the arguments are not null
--
hr_api.mandatory_arg_error
(p_api_name => l_proc,
p_argument => 'validation_start_date',
p_argument_value => p_validation_start_date);
End dt_delete_validate;
Procedure insert_validate
(p_rec in pay_cnt_shd.g_rec_type,
p_effective_date in date,
p_datetrack_mode in varchar2,
p_validation_start_date in date,
p_validation_end_date in date) is
--
l_proc varchar2(72) := g_package||'insert_validate';
End insert_validate;
Procedure update_validate
(p_rec in pay_cnt_shd.g_rec_type,
p_effective_date in date,
p_datetrack_mode in varchar2,
p_validation_start_date in date,
p_validation_end_date in date) is
--
l_proc varchar2(72) := g_package||'update_validate';
chk_non_updateable_args
(p_rec => p_rec,
p_effective_date => p_effective_date);
dt_update_validate
(
p_datetrack_mode => p_datetrack_mode,
p_validation_start_date => p_validation_start_date,
p_validation_end_date => p_validation_end_date);
End update_validate;
Procedure delete_validate
(p_rec in pay_cnt_shd.g_rec_type,
p_effective_date in date,
p_datetrack_mode in varchar2,
p_delete_routine in varchar2,
p_validation_start_date in date,
p_validation_end_date in date) is
--
l_proc varchar2(72) := g_package||'delete_validate';
chk_delete
(p_effective_date => p_effective_date,
p_assignment_id => pay_cnt_shd.g_old_rec.assignment_id,
p_state_code => pay_cnt_shd.g_old_rec.state_code,
p_county_code => pay_cnt_shd.g_old_rec.county_code,
p_delete_mode => p_datetrack_mode,
p_delete_routine => p_delete_routine);
dt_delete_validate
(p_datetrack_mode => p_datetrack_mode,
p_validation_start_date => p_validation_start_date,
p_validation_end_date => p_validation_end_date,
p_emp_county_tax_rule_id => p_rec.emp_county_tax_rule_id);
End delete_validate;
select a.legislation_code
from per_business_groups a,
pay_us_emp_county_tax_rules_f b
where b.emp_county_tax_rule_id = p_emp_county_tax_rule_id
and a.business_group_id = b.business_group_id;