The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT c1.context_id original_entry_id,
c2.context_id jurisdiction_code,
c3.context_id tax_group
INTO g_context_ids
FROM FF_CONTEXTS c3,
FF_CONTEXTS c2,
FF_CONTEXTS c1
WHERE c1.context_name = 'ORIGINAL_ENTRY_ID'
and c2.context_name = 'JURISDICTION_CODE'
and c3.context_name = 'TAX_GROUP';
SELECT ou.org_information9
INTO g_legislation_code
FROM HR_ORGANIZATION_INFORMATION ou,
HR_ORGANIZATION_UNITS o,
PAY_PAYROLL_ACTIONS pa
WHERE pa.payroll_action_id = p_pay_act_id
and o.business_group_id = pa.business_group_id
and ou.organization_id = o.organization_id
and ou.org_information_context = 'Business Group Information';
'SELECT DISTINCT
asg.person_id
FROM PER_ASSIGNMENTS_F asg,
PAY_PAYROLL_ACTIONS pa
WHERE pa.payroll_action_id = :payroll_action_id
and asg.business_group_id = pa.business_group_id
ORDER BY
asg.person_id';
SELECT DISTINCT
asg.assignment_id
FROM PAY_PAYROLL_ACTIONS pa,
PER_ALL_ASSIGNMENTS_F asg,
PER_PERIODS_OF_SERVICE pos
WHERE pa.payroll_action_id = b_pay_act_id
and asg.business_group_id = pa.business_group_id
and pa.effective_date between
asg.effective_start_date and asg.effective_end_date
and pos.period_of_service_id = asg.period_of_service_id
and pos.person_id between b_stperson and b_endperson;
SELECT pay_assignment_actions_s.nextval
INTO l_locking_asg_act_id
FROM DUAL;
SELECT 1
FROM PAY_ACTION_CONTEXTS ac
WHERE ac.assignment_action_id = b_asg_act_id
and ac.assignment_id = b_asg_id
and ac.context_id = b_context_id
and ac.context_value = b_context_value;
INSERT INTO pay_action_contexts (
assignment_action_id,
assignment_id,
context_id,
context_value)
VALUES (
p_asg_act_id,
p_asg_id,
p_context_id,
p_context_value);
SELECT distinct
et.element_type_id,
et.processing_type,
rr.source_id,
rr.jurisdiction_code
FROM PAY_RUN_RESULTS rr,
PAY_ELEMENT_TYPES_F et
WHERE rr.assignment_action_id = b_asg_act_id
AND et.element_type_id = rr.element_type_id
AND p_effective_date between
et.effective_start_date and et.effective_end_date;
select 1
from pay_element_entries_f pee
where pee.element_entry_id = p_entry_id
and pee.entry_type = 'E';
SELECT oi.org_information5
INTO l_tax_group
FROM HR_ORGANIZATION_INFORMATION oi
WHERE upper(oi.org_information_context) = 'FEDERAL TAX RULES'
and oi.organization_id = p_tax_unit_id;
select 1
into is_oeid
from pay_status_processing_rules_f spr,
ff_fdi_usages_f fdi
where spr.element_type_id = rec_context_value.element_type_id
and p_effective_date between
spr.effective_start_date and spr.effective_end_date
and fdi.formula_id = spr.formula_id
and p_effective_date between
fdi.effective_start_date and fdi.effective_end_date
and fdi.item_name = 'ORIGINAL_ENTRY_ID'
and fdi.usage = 'U'
and rownum = 1;
SELECT pa.effective_date,
pa.action_type,
aat.assignment_id,
aat.assignment_action_id,
aat.tax_unit_id
FROM PAY_PAYROLL_ACTIONS pa,
PAY_ASSIGNMENT_ACTIONS aat,
PAY_ASSIGNMENT_ACTIONS aam
WHERE aam.assignment_action_id = b_asg_act_id
and aat.assignment_id = aam.assignment_id
and pa.payroll_action_id = aat.payroll_action_id
and pa.action_type in ('R', 'Q', 'B', 'V', 'I')
and pa.effective_date <= p_effective_date
and NOT EXISTS
(SELECT 1
FROM PAY_ACTION_CONTEXTS ac
WHERE ac.assignment_action_id = aat.assignment_action_id)
ORDER BY
aat.assignment_action_id;