The following lines contain the word 'select', 'insert', 'update' or 'delete':
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 pay_assignment_actions_s.nextval
from dual;
select pay_core_utils.get_parameter('FULL_OR_PARTIAL', ppa.legislative_parameters),
pay_core_utils.get_parameter('REPORTING_YEAR', ppa2.legislative_parameters),
pay_core_utils.get_parameter('LEGAL_ENTITY_ID', ppa2.legislative_parameters)
from pay_payroll_actions ppa, -- report payroll action
pay_payroll_actions ppa2 -- archive payroll action
where ppa.payroll_action_id = c_payroll_action_id
and ppa2.payroll_action_id = pay_core_utils.get_parameter('ARCHIVE_ACTION_ID', ppa.legislative_parameters);
select 1
from pay_payroll_actions ppa, -- report payroll action
pay_payroll_actions ppa2 -- archive payroll action
where pay_core_utils.get_parameter('FULL_OR_PARTIAL', ppa.legislative_parameters) = 'FULL'
and ppa.action_type = 'X'
and ppa.action_status = 'C'
and ppa.report_type = 'HK_IR56B_REPORT'
and ppa.payroll_action_id <> c_payroll_action_id
and ppa2.payroll_action_id = pay_core_utils.get_parameter('ARCHIVE_ACTION_ID', ppa.legislative_parameters)
and pay_core_utils.get_parameter('REPORTING_YEAR', ppa2.legislative_parameters) = c_reporting_year
and pay_core_utils.get_parameter('LEGAL_ENTITY_ID', ppa2.legislative_parameters) = c_legal_entity_id;
select distinct paaf.assignment_id,
paa.assignment_action_id,
pay_core_utils.get_parameter('ARCHIVE_ACTION_ID', ppa.legislative_parameters) archive_action_id,
pay_core_utils.get_parameter('LEGAL_ENTITY_ID', ppa2.legislative_parameters) legal_entity_id
from per_assignments_f paaf,
per_people_f papf,
pay_payroll_actions ppa, -- report payroll action
pay_payroll_actions ppa2, -- archive payroll action
pay_assignment_actions paa
where ppa.payroll_action_id = c_payroll_action_id
and papf.person_id between c_start_person_id and c_end_person_id
and papf.person_id = paaf.person_id
and papf.business_group_id = ppa.business_group_id
and ppa2.payroll_action_id = paa.payroll_action_id
and paaf.assignment_id = paa.assignment_id
and ppa2.payroll_action_id = pay_core_utils.get_parameter('ARCHIVE_ACTION_ID', ppa.legislative_parameters)
and ppa2.action_type = 'X'
and ppa2.action_status = 'C'
--
-- if assignment_id was supplied for a partial run only return that
-- assignment else return them all for the archive action.
--
and paa.assignment_id = nvl(pay_core_utils.get_parameter('EMPLOYEE_NAME', ppa.legislative_parameters), paa.assignment_id)
--
-- don't process locked assignments
--
and not exists
(select locked_action_id
FROM pay_action_interlocks pai
WHERE pai.locked_action_id = paa.assignment_action_id)
;
SELECT printer,
print_style,
decode(save_output_flag, 'Y', 'TRUE', 'N', 'FALSE') save_output
FROM pay_payroll_actions pact,
fnd_concurrent_requests fcr
WHERE fcr.request_id = pact.request_id
AND pact.payroll_action_id = p_payroll_action_id;
select formula_id
from ff_formulas_f
where formula_name = p_formula_name
and business_group_id is null
and legislation_code = 'HK' ;
select fai.value
from ff_archive_items fai,
ff_user_entities fue
where fai.context1 = c_assignment_action_id
and fai.user_entity_id = fue.user_entity_id
and fue.user_entity_name = c_archive_name;