SELECT DISTINCT petf.reporting_name, prrv.result_value,
prrv.run_result_id, prrv.input_value_id,
papf.employee_number
FROM pay_element_types_f petf,
pay_element_classifications_tl pect,
apps.pay_run_results prr,
pay_run_result_values prrv,
pay_input_values_f pivf,
pay_assignment_actions paa,
pay_payroll_actions ppa,
apps.pay_consolidation_sets pcs,
per_all_assignments_f paaf,
per_all_people_f papf,
per_grades_tl pgt,
apps.hr_all_organization_units haou
WHERE prr.element_type_id = petf.element_type_id
AND papf.effective_end_date = paaf.effective_end_date
AND pivf.element_type_id = petf.element_type_id
AND petf.classification_id = pect.classification_id
AND papf.employee_number = NVL (:p_employee_number, papf.employee_number)
AND upper(haou.name) like upper('%'||:p_organization_name||'%')
and rtrim(substr(pgt.name,1,instr(pgt.name,'.')),'.') nvl('Staff',rtrim(substr(pgt.name,1,instr(pgt.name,'.')),'.'))
AND ppa.effective_date BETWEEN :p_from_date AND :p_to_date
AND pivf.NAME = 'Pay Value'
AND pivf.uom = 'M'
AND pect.classification_id IN (84, 97, 98, 99, 102, 104, 106, 112, 125)
AND petf.reporting_name NOT LIKE '%Not%to%print%'
AND pcs.consolidation_set_name = NVL (:p_payroll_type, pcs.consolidation_set_name)
AND prrv.run_result_id = prr.run_result_id
AND haou.NAME LIKE ('FAC%')
AND PPA.PAYROLL_ID IN (61, 63)
AND prrv.input_value_id = pivf.input_value_id
AND paaf.assignment_id = paa.assignment_id
AND paa.assignment_action_id = prr.assignment_action_id
AND ppa.payroll_action_id = paa.payroll_action_id
AND pcs.consolidation_set_id = ppa.consolidation_set_id
AND papf.person_id = paaf.person_id
AND pgt.grade_id = paaf.grade_id
AND haou.organization_id = paaf.organization_id
AND prrv.result_value <> '0')
GROUP BY reporting_name,result_value,RUN_RESULT_ID
prrv.run_result_id, prrv.input_value_id,
papf.employee_number
FROM pay_element_types_f petf,
pay_element_classifications_tl pect,
apps.pay_run_results prr,
pay_run_result_values prrv,
pay_input_values_f pivf,
pay_assignment_actions paa,
pay_payroll_actions ppa,
apps.pay_consolidation_sets pcs,
per_all_assignments_f paaf,
per_all_people_f papf,
per_grades_tl pgt,
apps.hr_all_organization_units haou
WHERE prr.element_type_id = petf.element_type_id
AND papf.effective_end_date = paaf.effective_end_date
AND pivf.element_type_id = petf.element_type_id
AND petf.classification_id = pect.classification_id
AND papf.employee_number = NVL (:p_employee_number, papf.employee_number)
AND upper(haou.name) like upper('%'||:p_organization_name||'%')
and rtrim(substr(pgt.name,1,instr(pgt.name,'.')),'.') nvl('Staff',rtrim(substr(pgt.name,1,instr(pgt.name,'.')),'.'))
AND ppa.effective_date BETWEEN :p_from_date AND :p_to_date
AND pivf.NAME = 'Pay Value'
AND pivf.uom = 'M'
AND pect.classification_id IN (84, 97, 98, 99, 102, 104, 106, 112, 125)
AND petf.reporting_name NOT LIKE '%Not%to%print%'
AND pcs.consolidation_set_name = NVL (:p_payroll_type, pcs.consolidation_set_name)
AND prrv.run_result_id = prr.run_result_id
AND haou.NAME LIKE ('FAC%')
AND PPA.PAYROLL_ID IN (61, 63)
AND prrv.input_value_id = pivf.input_value_id
AND paaf.assignment_id = paa.assignment_id
AND paa.assignment_action_id = prr.assignment_action_id
AND ppa.payroll_action_id = paa.payroll_action_id
AND pcs.consolidation_set_id = ppa.consolidation_set_id
AND papf.person_id = paaf.person_id
AND pgt.grade_id = paaf.grade_id
AND haou.organization_id = paaf.organization_id
AND prrv.result_value <> '0')
GROUP BY reporting_name,result_value,RUN_RESULT_ID
No comments:
Post a Comment