The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT PAY_FI_ARCHIVE_ACRA.GET_PARAMETER(legislative_parameters,
'LEGAL_EMPLOYER')
,PAY_FI_ARCHIVE_ACRA.GET_PARAMETER(legislative_parameters,'LOCAL_UNIT_NAME')
,PAY_FI_ARCHIVE_ACRA.GET_PARAMETER(legislative_parameters,'ELEMENT_NAME')
,PAY_FI_ARCHIVE_ACRA.GET_PARAMETER(legislative_parameters,'ELEMENT_SET')
,FND_DATE.canonical_to_date(PAY_FI_ARCHIVE_ACRA.GET_PARAMETER
(legislative_parameters,'START_DATE'))
,FND_DATE.canonical_to_date(PAY_FI_ARCHIVE_ACRA.GET_PARAMETER
(legislative_parameters,'END_DATE'))
,PAY_FI_ARCHIVE_ACRA.GET_PARAMETER(legislative_parameters,'ARCHIVE')
,effective_date
,business_group_id
FROM pay_payroll_actions
WHERE payroll_action_id = p_payroll_action_id;
SELECT o1.name , hoi2.ORG_INFORMATION1 , hoi2.ORG_INFORMATION7
FROM hr_organization_units o1
, hr_organization_information hoi1
, hr_organization_information hoi2
WHERE o1.business_group_id =l_business_group_id
AND hoi1.organization_id = o1.organization_id
AND hoi1.organization_id = csr_v_local_unit_id
AND hoi1.org_information1 = 'FI_LOCAL_UNIT'
AND hoi1.org_information_context = 'CLASS'
AND o1.organization_id =hoi2.organization_id
AND hoi2.ORG_INFORMATION_CONTEXT='FI_LOCAL_UNIT_DETAILS';
SELECT o1.name ,hoi2.ORG_INFORMATION1 , hoi2.ORG_INFORMATION11
FROM hr_organization_units o1
, hr_organization_information hoi1
, hr_organization_information hoi2
WHERE o1.business_group_id =l_business_group_id
AND hoi1.organization_id = o1.organization_id
AND hoi1.organization_id = csr_v_legal_emp_id
AND hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
AND hoi1.org_information_context = 'CLASS'
AND o1.organization_id =hoi2.organization_id
AND hoi2.ORG_INFORMATION_CONTEXT='FI_LEGAL_EMPLOYER_DETAILS' ;
SELECT element_name
FROM pay_element_types_f
WHERE element_type_id=csr_v_element_type_id
AND (business_group_id=l_business_group_id
OR legislation_code='FI');
SELECT element_set_name
FROM pay_element_sets
WHERE element_set_id=csr_v_element_set_id
AND (business_group_id=l_business_group_id
OR legislation_code='FI');
SELECT element_type_id
FROM pay_element_set_members
WHERE element_set_id=csr_v_element_set_id;
SELECT hoi2.ORG_INFORMATION1 local_unit
FROM hr_organization_units o1
, hr_organization_information hoi1
, hr_organization_information hoi2
WHERE o1.business_group_id =l_business_group_id
AND hoi1.organization_id = o1.organization_id
AND hoi1.organization_id = csr_v_legal_unit_id
AND hoi1.org_information1 = 'HR_LEGAL_EMPLOYER'
AND hoi1.org_information_context = 'CLASS'
AND o1.organization_id =hoi2.organization_id
AND hoi2.ORG_INFORMATION_CONTEXT='FI_LOCAL_UNITS';
SELECT Distinct pet.element_type_id
,pet.element_name
,pcak.concatenated_segments
,pc.cost_allocation_keyflex_id
,pc.debit_or_credit
,sum(pc.costed_value) costed_value
FROM pay_element_types_f pet
, pay_input_values_f piv
, pay_run_results prr
/*, pay_element_set_members pesm*/
, pay_costs pc
, pay_cost_allocation_keyflex pcak
, pay_assignment_actions paa
, pay_payroll_actions ppa
, per_all_assignments_f paaf
, hr_soft_coding_keyflex hsck
WHERE pet.element_type_id =l_element_type_id
AND (pet.business_group_id = l_business_group_id
OR pet.legislation_code='FI')
/*AND pet.element_type_id=pesm.element_type_id (+)*/
AND pet.element_type_id = piv.element_type_id
AND piv.name ='Pay Value'
AND nvl(pc.distributed_input_value_id, pc.input_value_id) =
piv.input_value_id
AND prr.element_type_id = pet.element_type_id
AND prr.run_result_id = pc.run_result_id
AND pc.balance_or_cost = 'C'
AND pc.cost_allocation_keyflex_id = pcak.cost_allocation_keyflex_id
AND prr.assignment_action_id = paa.assignment_action_id
AND paa.payroll_action_id = ppa.payroll_action_id
AND ppa.date_earned between pet.effective_start_date and
pet.effective_end_date
AND ppa.date_earned between l_start_date and l_end_date
AND paa.assignment_id = paaf.assignment_id
AND ppa.date_earned between paaf.effective_start_date and
paaf.effective_end_date
AND ppa.date_earned between piv.effective_start_date and
piv.effective_end_date
AND paaf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
AND hsck.segment2 = nvl(l_local,hsck.segment2)
GROUP BY pet.element_type_id
,pet.element_name
,pcak.concatenated_segments
,pc.debit_or_credit
,pc.cost_allocation_keyflex_id;
p_sql := 'SELECT DISTINCT person_id
FROM per_people_f ppf
,pay_payroll_actions ppa
WHERE ppa.payroll_action_id = :payroll_action_id
AND ppa.business_group_id = ppf.business_group_id
ORDER BY ppf.person_id';
SELECT count(*) INTO l_count
FROM pay_action_information
WHERE action_information_category = 'EMEA REPORT DETAILS'
AND action_information1= 'PYFIACRA'
AND action_context_id= p_payroll_action_id;
SELECT count(*) INTO l_count
FROM pay_action_information
WHERE action_information_category = 'EMEA REPORT INFORMATION'
AND action_information1='PYFIACRA'
AND action_information2='ES'
AND action_context_id= p_payroll_action_id;
-- Return cursor that selects no rows
p_sql := 'select 1 from dual where to_char(:payroll_action_id) = dummy';