The following lines contain the word 'select', 'insert', 'update' or 'delete':
select null
from pay_us_states a
where a.state_code = p_state_code;
select business_group_id
from per_assignments_f asg
where asg.assignment_id = p_assignment_id
and p_effective_date between asg.effective_start_date
and asg.effective_end_date;
select null
from pay_us_emp_fed_tax_rules_f fed
where fed.assignment_id = p_assignment_id
and p_effective_date between fed.effective_start_date
and fed.effective_end_date;
select state_abbrev
from pay_us_states pus,
pay_us_emp_state_tax_rules_f str
where pus.state_code = str.state_code
and str.emp_state_tax_rule_id = p_emp_state_tax_rule_id;
select null
from pay_us_states pus, pay_state_rules psr
where pus.state_code = p_state_code
and pus.state_abbrev = psr.state_code
and psr.jurisdiction_code = p_jurisdiction_code;
select psr.fs_lookup_type
from pay_us_states pus, pay_state_rules psr
where pus.state_code = p_state_code
and pus.state_abbrev = psr.state_code;
Procedure chk_non_updateable_args
(p_rec in pay_sta_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_emp_state_tax_rule_id in number
,p_assignment_id in number
,p_effective_date in date
,p_datetrack_mode in varchar2
,p_validation_start_date in date
,p_validation_end_date in date
,p_delete_routine in varchar2 default null
) is
--
l_effective_date date;
l_proc varchar2(72) := g_package||'chk_delete';
select null
from pay_run_results prr,
pay_assignment_actions paa
where substr(prr.jurisdiction_code,1,2)=pay_sta_shd.g_old_rec.state_code
and paa.assignment_action_id = prr.assignment_action_id
and paa.assignment_id = pay_sta_shd.g_old_rec.assignment_id
and exists (select null
from pay_payroll_actions ppa
where ppa.payroll_action_id = paa.payroll_action_id
and ppa.action_type in ('Q','R')
and ppa.date_earned > p_csr_tmp_date
);
select null
from per_assignments_f asg,
hr_locations hrl
where asg.assignment_id = pay_sta_shd.g_old_rec.assignment_id
and hrl.location_id = asg.location_id
and asg.effective_end_date > p_csr_tmp_date
and exists (select null
from pay_us_states pus
where pus.state_abbrev = hrl.region_2
and pus.state_code = pay_sta_shd.g_old_rec.state_code);
select null
from per_assignments_f asg,
per_addresses pad
where asg.assignment_id = pay_sta_shd.g_old_rec.assignment_id
and pad.person_id = asg.person_id
and pad.primary_flag = 'Y'
and nvl(pad.date_to, hr_api.g_eot) > p_csr_tmp_date
and exists (select null
from pay_us_states pus
where pus.state_abbrev = pad.region_2
and pus.state_code = pay_sta_shd.g_old_rec.state_code);
select null
from pay_us_emp_county_tax_rules_f cnt
where cnt.assignment_id = p_assignment_id
and cnt.state_code = pay_sta_shd.g_old_rec.state_code
and cnt.effective_end_date > p_effective_date;
if nvl(p_delete_routine,'X') = 'ASSIGNMENT' then
--
-- Perform validation for valid datetrack delete modes.
--
If p_datetrack_mode in(hr_api.g_zap, hr_api.g_delete) then
--
hr_utility.set_location(l_proc,20);
hr_utility.set_message(801, 'PAY_52235_TAX_RULE_DELETE');
else -- p_delete_routine <> 'ASSIGNMENT'
--
hr_utility.set_location(l_proc,20);
hr_utility.set_message(801, 'PAY_52235_TAX_RULE_DELETE');
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_state_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_sta_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_sta_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_sta_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,
p_delete_routine in varchar2
) is
--
l_proc varchar2(72) := g_package||'delete_validate';
chk_delete
(p_emp_state_tax_rule_id => p_rec.emp_state_tax_rule_id
,p_assignment_id => pay_sta_shd.g_old_rec.assignment_id
,p_effective_date => p_effective_date
,p_datetrack_mode => p_datetrack_mode
,p_validation_start_date => p_validation_start_date
,p_validation_end_date => p_validation_end_date
,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_state_tax_rule_id => p_rec.emp_state_tax_rule_id);
End delete_validate;
select a.legislation_code
from per_business_groups a,
pay_us_emp_state_tax_rules_f b
where b.emp_state_tax_rule_id = p_emp_state_tax_rule_id
and a.business_group_id = b.business_group_id;