665: where organization_id = p_bg_id ;
666:
667: cursor c_plcy (l_pl_id Number , l_typ_cd varchar2) is
668: select a.plcy_r_grp
669: from ben_popl_org_f a,
670: ben_popl_org_role_f b
671: where a.pl_id = l_pl_id
672: and a.plcy_r_grp is not null
673: and a.popl_org_id = b.popl_org_id
678: and b.effective_end_date;
679:
680: cursor c_plplcy (l_pl_id Number) is
681: select a.plcy_r_grp
682: from ben_popl_org_f a
683: where a.pl_id = l_pl_id
684: and a.plcy_r_grp is not null
685: and p_effective_date between a.effective_start_date
686: and a.effective_end_date ;
687:
688:
689: cursor c_custid (l_pl_id Number , l_typ_cd varchar2) is
690: select a.cstmr_num
691: from ben_popl_org_f a,
692: ben_popl_org_role_f b
693: where a.pl_id = l_pl_id
694: and a.cstmr_num is not null
695: and a.popl_org_id = b.popl_org_id
700: and b.effective_end_date;
701:
702: cursor c_rolname (l_pl_id Number , l_typ_cd varchar2) is
703: select b.name
704: from ben_popl_org_f a,
705: ben_popl_org_role_f b
706: where a.pl_id = l_pl_id
707: and b.name is not null
708: and b.org_role_typ_cd = l_typ_cd