321: and epe.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
322: and (exists (select null from ben_enrt_rt ecr
323: where ecr.elig_per_elctbl_chc_id = epe.elig_per_elctbl_chc_id
324: and ecr.rt_mlt_cd = 'ERL') or exists (
325: select null from ben_enrt_rt ecr, ben_enrt_bnft enb
326: where enb.elig_per_elctbl_chc_id = epe.elig_per_elctbl_chc_id
327: and ecr.enrt_bnft_id = enb.enrt_bnft_id
328: and ecr.rt_mlt_cd = 'ERL'));
329:
345: where epe.per_in_ler_id = l_per_in_ler_id
346: and epe.pil_elctbl_chc_popl_id = pel.pil_elctbl_chc_popl_id
347: and epe.per_in_ler_id = pel.per_in_ler_id
348: and epe.comp_lvl_cd not in ('PLANFC', 'PLANIMP')
349: and (exists (select null from ben_enrt_bnft enb
350: where enb.elig_per_elctbl_chc_id = epe.elig_per_elctbl_chc_id
351: and enb.cvg_mlt_cd = 'ERL')
352: );
353: --
436: enb.enrt_bnft_id,
437: enb.prtt_enrt_rslt_id,
438: enb.entr_val_at_enrt_flag,
439: enb.CVG_MLT_CD
440: from ben_enrt_bnft enb
441: where enb.elig_per_elctbl_chc_id = l_epe.elig_per_elctbl_chc_id
442: and ( enb.prtt_enrt_rslt_id = l_epe.prtt_enrt_rslt_id OR
443: (enb.prtt_enrt_rslt_id is null /* Bug 4715688 */
444: and enb.cvg_mlt_cd not like '%RNG')--bug#4938930