The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT fnd_date.canonical_to_date(pay_nl_taxoffice_file.get_parameter(legislative_parameters,'REPORT_YEAR'))
,pay_nl_taxoffice_file.get_parameter(legislative_parameters,'EMPLOYER_ID')
,pay_nl_taxoffice_file.get_parameter(legislative_parameters,'ORG_HIERARCHY')
,effective_date
,business_group_id
FROM pay_payroll_actions
WHERE payroll_action_id = p_payroll_action_id;
|Description: This procedure returns a sql string to select a range of|
| assignments eligible for archival
----------------------------------------------------------------------*/
Procedure RANGE_CODE (pactid IN NUMBER
,sqlstr OUT NOCOPY VARCHAR2) is
v_log_header VARCHAR2(255);
/*Return the SELECT Statement to select a range of assignments
eligible for archival */
IF g_error_count=0 THEN
sqlstr := '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';
sqlstr := 'SELECT DISTINCT person_id
FROM per_people_f ppf
,pay_payroll_actions ppa
WHERE ppa.payroll_action_id = :payroll_action_id
AND 1 = 2
AND ppa.business_group_id = ppf.business_group_id
ORDER BY ppf.person_id';
Annual Tax Statement File process for the selected year and the Employer matches
the one selected in the SRS Request */
CURSOR Cur_EE_ATS_File(lp_employer_id number,
lp_Tax_Year_Start_Date Date,
lp_Tax_Year_End_Date Date,
lp_start_person_id number,
lp_end_person_id number) IS
Select
ee_ats.effective_date
,ee_ats.action_information1 employer_id
,ee_ats.action_information2 person_id
,ee_ats.action_information3 assignment_id
,ee_ats.action_context_id arch_ass_act_id
,pap.full_name full_name
,paa.assignment_number assignment_number
from pay_action_information ee_ats
,per_all_people_f pap
,per_all_assignments_f paa
WHERE ee_ats.action_context_type='AAP'
AND ee_ats.action_information_category = 'NL ATS EMPLOYEE DETAILS'
AND ee_ats.effective_date =lp_Tax_Year_End_Date
AND ee_ats.action_information1 =fnd_number.number_to_canonical(lp_employer_id)
AND fnd_number.canonical_to_number(ee_ats.action_information2) BETWEEN lp_start_person_id AND lp_end_person_id
AND paa.assignment_id = fnd_number.canonical_to_number(ee_ats.action_information3)
AND paa.effective_start_date =
(
SELECT MIN(asg.effective_start_date)
FROM per_assignment_status_types past, per_all_assignments_f asg
WHERE asg.assignment_id = paa.assignment_id
and past.per_system_status = 'ACTIVE_ASSIGN'
and asg.assignment_status_type_id = past.assignment_status_type_id
and asg.effective_start_date <= lp_Tax_Year_End_Date
and nvl(asg.effective_end_date, lp_Tax_Year_End_Date) >= lp_Tax_Year_Start_Date
)
AND pap.person_id = fnd_number.canonical_to_number(ee_ats.action_information2)
AND lp_Tax_Year_End_Date between pap.effective_start_date and pap.effective_end_date
AND pap.person_id = paa.person_id
AND not exists
(select arc_lck.locked_action_id from pay_action_interlocks arc_lck
where arc_lck.locked_action_id = ee_ats.action_context_id);
SELECT pay_assignment_actions_s.NEXTVAL
INTO l_asg_act_id
FROM dual;
select ORG_INFORMATION3,ORG_INFORMATION4
from hr_organization_information
where ORG_INFORMATION_CONTEXT='NL_BG_INFO' and
organization_id=P_Business_Group_Id;
select hoi.ORG_INFORMATION14,hoi.ORG_INFORMATION4
from hr_organization_units hou,hr_organization_information hoi
where
hoi.org_information_context= 'NL_ORG_INFORMATION'
and hou.business_group_id=p_business_group_id
and hou.organization_id= hoi.organization_id
and hou.organization_id = P_Employer_ID;