Search This Blog

Friday, July 28, 2017

Run Result Query in Fusion

select a.LEGISLATIVE_DATA_GROUP_ID,
e.payroll_relationship_number,f.full_name,D.RESULT_VALUE
from
PAY_PAYROLL_ACTIONS a, PAY_PAYROLL_REL_ACTIONS b, pay_run_results
c,PAY_RUN_RESULT_VALUES D,PAY_PAY_RELATIONSHIPS_Dn e , PER_person_names_f f
where a.LEGISLATIVE_DATA_GROUP_ID IN (SELECT LEGISLATIVE_DATA_GROUP_ID FROM
PER_LEGISLATIVE_DATA_GROUPS_VL where legislation_code IN ('SA')) and
a.action_type='R'
and a.PAYROLL_ACTION_id=b.PAYROLL_ACTION_id
and b.payroll_rel_action_id=c.payroll_rel_action_id
and c.element_type_id in
(select element_type_id from pay_element_types_vl
  where legislation_code= 'SA'
  and element_name like 'GOSI Reference Salary' ) AND D.RUN_RESULT_ID
=C.RUN_RESULT_ID and b.payroll_relationship_id=e.payroll_relationship_id
and e.person_id=f.person_id
and f.name_type='GLOBAL'
order by a.LEGISLATIVE_DATA_GROUP_ID, e.payroll_relationship_number;

No comments:

Post a Comment