The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT TP.start_date
INTO l_period_start_date
FROM per_time_periods TP
,pay_payroll_actions PACT
WHERE PACT.payroll_action_id = p_owner_payroll_action_id
AND PACT.payroll_id = TP.payroll_id
AND p_owner_effective_date BETWEEN TP.start_date AND TP.end_date;
SELECT TO_DATE(decode(sign(to_number(to_char(p_effective_date,'MM'))-3),1,TO_DATE('01/04/'||(to_char(p_effective_date,'YYYY') + 1) , 'DD/MM/YYYY') ,TO_DATE('01/04/'||(to_char(p_effective_date,'YYYY')) , 'DD/MM/YYYY') ) )
INTO l_date
FROM dual;
SELECT bd.period_type
,pact.business_group_id
FROM pay_payroll_actions pact
,hr_organization_information hoi
,pay_balance_dimensions bd
WHERE pact.payroll_action_id = p_payroll_action_id
AND hoi.organization_id = pact.business_group_id
AND UPPER(hoi.org_information_context) = 'BUSINESS GROUP INFORMATION'
AND bd.dimension_name = p_dimension_name
AND bd.legislation_code = hoi.org_information9;
select pee.element_entry_id
from pay_element_entries_f pee,
pay_element_types_f pet,
per_all_assignments_f paf1,
per_all_assignments_f paf2,
pay_assignment_actions paa1
where pet.element_name='Court Order Information'
and pet.legislation_code='FI'
and pet.element_type_id=pee.element_type_id
and paa1.assignment_action_id=p_owner_assignment_action_id
and paf1.business_group_id=p_business_group_id
and paf2.business_group_id=p_business_group_id
and paa1.assignment_id=paf1.assignment_id
and paf2.primary_flag='Y'
and paf1.person_id=paf2.person_id
and pee.assignment_id=paf2.assignment_id
and p_owner_effective_date between pee.effective_start_date
and pee.effective_end_date
and p_owner_effective_date between pet.effective_start_date
and pet.effective_end_date
and p_owner_effective_date between paf1.effective_start_date
and paf1.effective_end_date
and p_owner_effective_date between paf2.effective_start_date
and paf2.effective_end_date ;
SELECT bd.period_type
,pact.business_group_id
FROM pay_payroll_actions pact
,hr_organization_information hoi
,pay_balance_dimensions bd
WHERE pact.payroll_action_id = p_payroll_action_id
AND hoi.organization_id = pact.business_group_id
AND UPPER(hoi.org_information_context) = 'BUSINESS GROUP INFORMATION'
AND bd.dimension_name = p_dimension_name
AND bd.legislation_code = hoi.org_information9;
select pee.element_entry_id , pee.effective_end_date
from pay_element_entries_f pee,
pay_element_types_f pet,
per_all_assignments_f paf1,
per_all_assignments_f paf2,
pay_assignment_actions paa1
where pet.element_name='Court Order Information'
and pet.legislation_code='FI'
and pet.element_type_id=pee.element_type_id
and paa1.assignment_action_id=p_owner_assignment_action_id
and paf1.business_group_id=p_business_group_id
and paf2.business_group_id=p_business_group_id
and paa1.assignment_id=paf1.assignment_id
and paf2.primary_flag='Y'
and paf1.person_id=paf2.person_id
and pee.assignment_id=paf2.assignment_id
and p_owner_effective_date between pee.effective_start_date
and pee.effective_end_date
and p_owner_effective_date between pet.effective_start_date
and pet.effective_end_date
and p_owner_effective_date between paf1.effective_start_date
and paf1.effective_end_date
and p_owner_effective_date between paf2.effective_start_date
and paf2.effective_end_date ;
SELECT bd.period_type
,pact.business_group_id
FROM pay_payroll_actions pact
,hr_organization_information hoi
,pay_balance_dimensions bd
WHERE pact.payroll_action_id = p_payroll_action_id
AND hoi.organization_id = pact.business_group_id
AND UPPER(hoi.org_information_context) = 'BUSINESS GROUP INFORMATION'
AND bd.dimension_name = p_dimension_name
AND bd.legislation_code = hoi.org_information9;
SELECT bd.period_type
,pact.business_group_id
FROM pay_payroll_actions pact
,hr_organization_information hoi
,pay_balance_dimensions bd
WHERE pact.payroll_action_id = p_payroll_action_id
AND hoi.organization_id = pact.business_group_id
AND UPPER(hoi.org_information_context) = 'BUSINESS GROUP INFORMATION'
AND bd.dimension_name = p_dimension_name
AND bd.legislation_code = hoi.org_information9;