SELECT GRP_ALLOCATION.VC_PLAN_ID ,GRP_ALLOCATION.VC_PAYOUT_PRD_ID ,GRP_ALLOCATION.GB_GROUP_ID ,TREENODE.PARENT_NODE_NAME ,VC_PLAN_TBL.TREE_NAME ,GRP_ALLOCATION.CURRENCY_CD ,GRP_ALLOCATION.VC_ORIGINAL_ALLOC ,GRP_ALLOCATION.VC_BALANCE_ALLOC ,GRP_ALLOCATION.VC_RESERVE_BALANCE ,GRP_AWARD.VC_TARGET_VALUE ,GRP_AWARD.VC_GRP_PERF_FACTOR ,PAYOUT_PRD_TBL.VC_ORG_PERF_FACTOR ,GRP_ALLOCATION.NUMBER_OF_EMPL ,VC_PLAN_TBL.VC_ORG_PLAN_WEIGHT ,VC_PLAN_TBL.VC_GRP_PLAN_WEIGHT ,VC_PLAN_TBL.VC_IND_PLAN_WEIGHT FROM PS_VC_GRP_ALLOC GRP_ALLOCATION , PS_VC_GRP_AWARD GRP_AWARD , PS_VC_PLAN_EFFDT VC_PLAN_TBL , PS_VC_PAYPRD_TBL PAYOUT_PRD_TBL , PSTREENODE TREENODE WHERE GRP_ALLOCATION.VC_PLAN_ID = VC_PLAN_TBL.VC_PLAN_ID AND VC_PLAN_TBL.VC_PLAN_ID = PAYOUT_PRD_TBL.VC_PLAN_ID AND PAYOUT_PRD_TBL.VC_PLAN_ID = GRP_AWARD.VC_PLAN_ID AND GRP_ALLOCATION.VC_PAYOUT_PRD_ID = PAYOUT_PRD_TBL.VC_PAYOUT_PRD_ID AND GRP_AWARD.VC_PAYOUT_PRD_ID = PAYOUT_PRD_TBL.VC_PAYOUT_PRD_ID AND GRP_AWARD.GB_GROUP_ID = GRP_ALLOCATION.GB_GROUP_ID AND VC_PLAN_TBL.EFFDT = ( SELECT MAX(EFFDT) FROM PS_VC_PLAN_EFFDT VC_PLAN_TBL2 WHERE VC_PLAN_TBL.VC_PLAN_ID = VC_PLAN_TBL2.VC_PLAN_ID AND VC_PLAN_TBL.EFF_STATUS = 'A' AND VC_PLAN_TBL2.EFFDT <= PAYOUT_PRD_TBL.PRD_END_DT) AND VC_PLAN_TBL.TREE_NAME = TREENODE.TREE_NAME AND TREENODE.EFFDT = ( SELECT MAX(EFFDT) FROM PSTREENODE TREENODE1 WHERE TREENODE1.SETID = TREENODE.SETID AND TREENODE1.SETCNTRLVALUE= TREENODE.SETCNTRLVALUE AND TREENODE1.TREE_NAME = TREENODE.TREE_NAME AND TREENODE1.EFFDT <= VC_PLAN_TBL.EFFDT AND TREENODE1.TREE_NODE = TREENODE.TREE_NODE) AND GRP_ALLOCATION.GB_GROUP_ID = TREENODE.TREE_NODE
|