SELECT a.calc_name , a.emplid , a.benefit_plan , a.functn_result_nm , a.fld_val_dec_novrd , z.descr , z.functn_name FROM ps_pa_fnc_rslt_tbl z , ps_pa_clc_val_dec a , ps_pa_fnc_rslt_dfn b , PS_PA_CALCULATION c WHERE a.calc_name = c.calc_name AND a.functn_result_nm = b.functn_result_nm AND b.benefit_plan = a.benefit_plan AND b.functn_name = 'VESTING' AND b.effdt = ( SELECT MAX(D.EFFDT) FROM PS_PA_FNC_RSLT_DFN D WHERE D.BENEFIT_PLAN = B.BENEFIT_PLAN AND D.FUNCTN_NAME = B.FUNCTN_NAME AND D.FUNCTN_RESULT_NM = B.FUNCTN_RESULT_NM AND D.EFFDT <= c.asofdate) AND a.functn_result_nm = z.functn_result_nm AND a.benefit_plan = z.benefit_plan
|