VC_LAST_TREE_VW

(SQL View)
Index Back

Latest defined Tree

Variable Comp: this view returns the latest defined tree for the given plan anf payout period.

SELECT B.VC_PLAN_ID , B.VC_PAYOUT_PRD_ID , C.EFFDT , A.TREE_NAME , A.EFFDT , B.PRD_END_DT FROM PS_VC_TREE_DT_VW A , PS_VC_PAYPRD_TBL B , PS_VC_PLAN_EFFDT C WHERE B.VC_PLAN_ID = C.VC_PLAN_ID AND C.TREE_NAME = A.TREE_NAME AND A.EFFDT = ( SELECT MAX(VC_TREE_DT_VW.EFFDT) FROM PS_VC_TREE_DT_VW VC_TREE_DT_VW WHERE VC_TREE_DT_VW.TREE_NAME = A.TREE_NAME AND VC_TREE_DT_VW.EFFDT <= B.PRD_END_DT AND VC_TREE_DT_VW.EFFDT <= %CurrentDateIn) AND C.EFFDT = ( SELECT MAX(EFFDT) FROM PS_VC_PLAN_EFFDT VC_PLAN_EFFDT WHERE B.VC_PLAN_ID = VC_PLAN_EFFDT.VC_PLAN_ID AND VC_PLAN_EFFDT.EFFDT <= %CurrentDateIn AND VC_PLAN_EFFDT.EFFDT <= B.PRD_END_DT) AND C.EFF_STATUS = 'A'

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 VC_PLAN_ID Character(10) VARCHAR2(10) NOT NULL VC Plan ID
2 VC_PAYOUT_PRD_ID Character(10) VARCHAR2(10) NOT NULL Payout Period ID
3 EFFDT Date(10) DATE Effective Date

Default Value: %date

4 TREE_NAME Character(18) VARCHAR2(18) NOT NULL Tree Name
5 TREE_EFFDT Date(10) DATE Effective date of the Tree
6 PRD_END_DT Date(10) DATE Pay Period End Date