BI - Payroll query

 /* Identify associates have issues with paycard */

 select ppr.PAYROLL_RELATIONSHIP_NUMBER,pvd.base_name
    , min(pvd.effective_start_date) Effective_Date
from fusion.PAY_RANGE_ITEMS_F pri
    , fusion.pay_value_definitions_f pvd
    , fusion.pay_dir_card_components_f pdcc
    , fusion.pay_dir_cards_f pdc
    , fusion.PAY_DIR_CARD_DEFINITIONS pdcd
    , fusion.PAY_PAY_RELATIONSHIPS_dn ppr
where pri.VALUE_DEFN_ID = pvd.VALUE_DEFN_ID
    and pvd.source_id = pdcc.dir_card_comp_id
    and pdcc.dir_card_id = pdc.dir_card_id
    and pdc.payroll_relationship_id = ppr.payroll_relationship_id
    and pdc.DIR_CARD_DEFINITION_ID = pdcd.DIR_CARD_DEFINITION_ID
    and pdcd.BASE_DISPLAY_NAME = 'CA_PERSONAL_FEDERAL_PROVINCIAL_RETURN'
    and ppr.PAYROLL_RELATIONSHIP_NUMBER in
(
'0001794208',
'00001841614',
'00001804425'
) -- add payroll relationship number
group by ppr.PAYROLL_RELATIONSHIP_NUMBER,pvd.base_name
having min(pvd.effective_start_date) <> min(pri.effective_start_date)
order by ppr.PAYROLL_RELATIONSHIP_NUMBER,pvd.base_name

No comments:

Post a Comment

Oracle HCM Cloud technical tips to grow your skills

Few information around Oracle HCM Cloud.