SQL to Pull Enterable Calculation Value

SQL to Pull Enterable Calculation Value

SQL to Pull Enterable Calculation Value

SELECT pdcd.DISPLAY_NAME
,pdccd.COMPONENT_NAME
,vdl.NAME "Display Value"
,pdcc.CONTEXT_VALUE1 "Reference"
,pri.VALUE1 "Value"
,to_char(pri.EFFECTIVE_START_DATE,'YYYY/MM/DD') "Effective Start Date"
,to_char(pri.EFFECTIVE_END_DATE,'YYYY/MM/DD') "Effective End Date"
,pgft.name gradename


FROM pay_range_items_f pri, 
pay_value_definitions_f vd, 
pay_dir_override_usages_f dou,
pay_allow_overrides_vl aor, 
pay_value_definitions_vl vdl, 
pay_dir_card_components_f pdcc, 
pay_dir_card_definitions_vl pdcd,
pay_dir_card_comp_defs_vl pdccd,
pay_dir_cards_f pdcf, 
pay_element_entries_f pee,
PAY_PAY_RELATIONSHIPS_DN pprd,
per_all_people_f papf,
PER_GRADES_F_TL pgft
--PER_VALID_GRADES_F pvgf


WHERE pri.value_defn_id = vd.value_defn_id
and vd.dir_override_usage_id = dou.dir_override_usage_id
and dou.allow_overrides_id = aor.allow_overrides_id
and vd.parent_value_defn_id = vdl.value_defn_id
--and vdl.NAME = 'Acting Assignment Job'
--and vd.source_type = 'PDCC' 
and vd.source_id = pdcc.dir_card_comp_id
and pdccd.dir_card_comp_def_id=pdcc.dir_card_comp_def_id
and pdccd.dir_card_definition_id = pdcd.dir_card_definition_id
and pdcc.dir_card_id = pdcf.dir_card_id
and pdcf.payroll_relationship_id =pprd.payroll_relationship_id
and pee.element_type_id = pdccd.element_type_id
and pee.creator_id = pdcc.dir_card_comp_id
and papf.person_id = pprd.person_id
and trunc(sysdate) between papf.EFFECTIVE_START_DATE and papf.EFFECTIVE_END_DATE
--and papf.person_number ='207381'
--and pee.creator_type = 'DIR_COMP'
--and pri.EFFECTIVE_START_DATE='2024-02-19'
--and pgft.grade_id = pri.VALUE1
--and trunc(sysdate) between pgft.EFFECTIVE_START_DATE and pgft.EFFECTIVE_END_DATE
-- and pvgf.GRADE_ID=pgft.GRADE_ID
-- and trunc(sysdate) between pvgf.EFFECTIVE_START_DATE and pvgf.EFFECTIVE_END_DATE

Leave a Reply

Your email address will not be published. Required fields are marked *