SELECT DISTINCT A.VC_PLAN_ID , B.VC_PAYOUT_PRD_ID , B.PRD_END_DT FROM PS_VC_PLAN_TBL A , PS_VC_PAYPRD_TBL B WHERE A.VC_PLAN_ID = B.VC_PLAN_ID AND EXISTS ( SELECT 'X' FROM PS_VC_PLAN_MEM D WHERE D.VC_PLAN_ID = A.VC_PLAN_ID AND D.VC_PAYOUT_PRD_ID=B.VC_PAYOUT_PRD_ID AND D.GB_GROUP_ID = 'NOGROUP') AND (( A.VC_PLAN_MEM_CRIT = 'E' AND EXISTS ( SELECT 'X' FROM PS_VC_GRP_AWARD C WHERE C.VC_PLAN_ID = A.VC_PLAN_ID AND C.VC_PAYOUT_PRD_ID=B.VC_PAYOUT_PRD_ID AND C.GB_GROUP_ID = 'NOGROUP') ) OR A.VC_PLAN_MEM_CRIT ='A')
|