143: and (
144: exists (select null
145: from ben_age_rt_f art,
146: ben_acty_base_rt_f abr,
147: ben_acty_vrbl_rt_f avr
148: where abr.'||p_col_name||'= :4
149: and abr.acty_base_rt_id = avr.acty_base_rt_id
150: and avr.vrbl_rt_prfl_id = art.vrbl_rt_prfl_id) or
151: exists (select null
150: and avr.vrbl_rt_prfl_id = art.vrbl_rt_prfl_id) or
151: exists (select null
152: from ben_cmbn_age_los_rt_f cmr,
153: ben_acty_base_rt_f abr,
154: ben_acty_vrbl_rt_f avr
155: where abr.'||p_col_name||'= :5
156: and abr.acty_base_rt_id = avr.acty_base_rt_id
157: and avr.vrbl_rt_prfl_id = cmr.vrbl_rt_prfl_id) or
158: exists (select null
157: and avr.vrbl_rt_prfl_id = cmr.vrbl_rt_prfl_id) or
158: exists (select null
159: from ben_comp_lvl_rt_f clr,
160: ben_acty_base_rt_f abr,
161: ben_acty_vrbl_rt_f avr
162: where abr.'||p_col_name||'= :6
163: and abr.acty_base_rt_id = avr.acty_base_rt_id
164: and avr.vrbl_rt_prfl_id = clr.vrbl_rt_prfl_id) or
165: exists (select null
164: and avr.vrbl_rt_prfl_id = clr.vrbl_rt_prfl_id) or
165: exists (select null
166: from ben_hrs_wkd_in_perd_rt_f hwr,
167: ben_acty_base_rt_f abr,
168: ben_acty_vrbl_rt_f avr
169: where abr.'||p_col_name||'= :7
170: and abr.acty_base_rt_id = avr.acty_base_rt_id
171: and avr.vrbl_rt_prfl_id = hwr.vrbl_rt_prfl_id) or
172: exists (select null
171: and avr.vrbl_rt_prfl_id = hwr.vrbl_rt_prfl_id) or
172: exists (select null
173: from ben_los_rt_f lsr,
174: ben_acty_base_rt_f abr,
175: ben_acty_vrbl_rt_f avr
176: where abr.'||p_col_name||'= :8
177: and abr.acty_base_rt_id = avr.acty_base_rt_id
178: and avr.vrbl_rt_prfl_id = lsr.vrbl_rt_prfl_id) or
179: exists (select null
178: and avr.vrbl_rt_prfl_id = lsr.vrbl_rt_prfl_id) or
179: exists (select null
180: from ben_pct_fl_tm_rt_f pfr,
181: ben_acty_base_rt_f abr,
182: ben_acty_vrbl_rt_f avr
183: where abr.'||p_col_name||'= :9
184: and abr.acty_base_rt_id = avr.acty_base_rt_id
185: and avr.vrbl_rt_prfl_id = pfr.vrbl_rt_prfl_id))';
186: --
305: drvbl_fctr_apls_rts_flag = :3 and
306: not exists (select null
307: from ben_age_rt_f art,
308: ben_acty_base_rt_f abr,
309: ben_acty_vrbl_rt_f avr
310: where abr.'||p_col_name||' = :4
311: and abr.acty_base_rt_id = avr.acty_base_rt_id
312: and avr.vrbl_rt_prfl_id = art.vrbl_rt_prfl_id) and
313: not exists (select null
312: and avr.vrbl_rt_prfl_id = art.vrbl_rt_prfl_id) and
313: not exists (select null
314: from ben_cmbn_age_los_rt_f cmr,
315: ben_acty_base_rt_f abr,
316: ben_acty_vrbl_rt_f avr
317: where abr.'||p_col_name||'= :5
318: and abr.acty_base_rt_id = avr.acty_base_rt_id
319: and avr.vrbl_rt_prfl_id = cmr.vrbl_rt_prfl_id) and
320: not exists (select null
319: and avr.vrbl_rt_prfl_id = cmr.vrbl_rt_prfl_id) and
320: not exists (select null
321: from ben_comp_lvl_rt_f clr,
322: ben_acty_base_rt_f abr,
323: ben_acty_vrbl_rt_f avr
324: where abr.'||p_col_name||'= :6
325: and abr.acty_base_rt_id = avr.acty_base_rt_id
326: and avr.vrbl_rt_prfl_id = clr.vrbl_rt_prfl_id) and
327: not exists (select null
326: and avr.vrbl_rt_prfl_id = clr.vrbl_rt_prfl_id) and
327: not exists (select null
328: from ben_hrs_wkd_in_perd_rt_f hwr,
329: ben_acty_base_rt_f abr,
330: ben_acty_vrbl_rt_f avr
331: where abr.'||p_col_name||'= :7
332: and abr.acty_base_rt_id = avr.acty_base_rt_id
333: and avr.vrbl_rt_prfl_id = hwr.vrbl_rt_prfl_id) and
334: not exists (select null
333: and avr.vrbl_rt_prfl_id = hwr.vrbl_rt_prfl_id) and
334: not exists (select null
335: from ben_los_rt_f lsr,
336: ben_acty_base_rt_f abr,
337: ben_acty_vrbl_rt_f avr
338: where abr.'||p_col_name||'= :8
339: and abr.acty_base_rt_id = avr.acty_base_rt_id
340: and avr.vrbl_rt_prfl_id = lsr.vrbl_rt_prfl_id) and
341: not exists (select null
340: and avr.vrbl_rt_prfl_id = lsr.vrbl_rt_prfl_id) and
341: not exists (select null
342: from ben_pct_fl_tm_rt_f pfr,
343: ben_acty_base_rt_f abr,
344: ben_acty_vrbl_rt_f avr
345: where abr.'||p_col_name||'= :9
346: and abr.acty_base_rt_id = avr.acty_base_rt_id
347: and avr.vrbl_rt_prfl_id = pfr.vrbl_rt_prfl_id)';
348: --
492: ptip_id,
493: plip_id,
494: oipl_id
495: from ben_acty_base_rt_f abr,
496: ben_acty_vrbl_rt_f avr
497: where avr.vrbl_rt_prfl_id = p_vrbl_rt_prfl_id
498: and avr.acty_base_rt_id = abr.acty_base_rt_id
499: -- RCHASE bug 1568561 - added union
500: union
599: and drvbl_fctr_apls_rts_flag = 'Y'
600: and not exists (select null
601: from ben_age_rt_f art,
602: ben_acty_base_rt_f abr,
603: ben_acty_vrbl_rt_f avr
604: where abr.pgm_id = i.pgm_id
605: and abr.acty_base_rt_id = avr.acty_base_rt_id
606: and avr.vrbl_rt_prfl_id = art.vrbl_rt_prfl_id)
607: and not exists (select null
606: and avr.vrbl_rt_prfl_id = art.vrbl_rt_prfl_id)
607: and not exists (select null
608: from ben_cmbn_age_los_rt_f cmr,
609: ben_acty_base_rt_f abr,
610: ben_acty_vrbl_rt_f avr
611: where abr.pgm_id = i.pgm_id
612: and abr.acty_base_rt_id = avr.acty_base_rt_id
613: and avr.vrbl_rt_prfl_id = cmr.vrbl_rt_prfl_id)
614: and not exists (select null
613: and avr.vrbl_rt_prfl_id = cmr.vrbl_rt_prfl_id)
614: and not exists (select null
615: from ben_comp_lvl_rt_f clr,
616: ben_acty_base_rt_f abr,
617: ben_acty_vrbl_rt_f avr
618: where abr.pgm_id = i.pgm_id
619: and abr.acty_base_rt_id = avr.acty_base_rt_id
620: and avr.vrbl_rt_prfl_id = clr.vrbl_rt_prfl_id)
621: and not exists (select null
620: and avr.vrbl_rt_prfl_id = clr.vrbl_rt_prfl_id)
621: and not exists (select null
622: from ben_hrs_wkd_in_perd_rt_f hwr,
623: ben_acty_base_rt_f abr,
624: ben_acty_vrbl_rt_f avr
625: where abr.pgm_id = i.pgm_id
626: and abr.acty_base_rt_id = avr.acty_base_rt_id
627: and avr.vrbl_rt_prfl_id = hwr.vrbl_rt_prfl_id)
628: and not exists (select null
627: and avr.vrbl_rt_prfl_id = hwr.vrbl_rt_prfl_id)
628: and not exists (select null
629: from ben_los_rt_f lsr,
630: ben_acty_base_rt_f abr,
631: ben_acty_vrbl_rt_f avr
632: where abr.pgm_id = i.pgm_id
633: and abr.acty_base_rt_id = avr.acty_base_rt_id
634: and avr.vrbl_rt_prfl_id = lsr.vrbl_rt_prfl_id)
635: and not exists (select null
634: and avr.vrbl_rt_prfl_id = lsr.vrbl_rt_prfl_id)
635: and not exists (select null
636: from ben_pct_fl_tm_rt_f pfr,
637: ben_acty_base_rt_f abr,
638: ben_acty_vrbl_rt_f avr
639: where abr.pgm_id = i.pgm_id
640: and abr.acty_base_rt_id = avr.acty_base_rt_id
641: and avr.vrbl_rt_prfl_id = pfr.vrbl_rt_prfl_id);
642: --
650: and drvbl_fctr_apls_rts_flag = 'Y'
651: and not exists (select null
652: from ben_age_rt_f art,
653: ben_acty_base_rt_f abr,
654: ben_acty_vrbl_rt_f avr
655: where abr.pl_id = i.pl_id
656: and abr.acty_base_rt_id = avr.acty_base_rt_id
657: and avr.vrbl_rt_prfl_id = art.vrbl_rt_prfl_id)
658: and not exists (select null
657: and avr.vrbl_rt_prfl_id = art.vrbl_rt_prfl_id)
658: and not exists (select null
659: from ben_cmbn_age_los_rt_f cmr,
660: ben_acty_base_rt_f abr,
661: ben_acty_vrbl_rt_f avr
662: where abr.pl_id = i.pl_id
663: and abr.acty_base_rt_id = avr.acty_base_rt_id
664: and avr.vrbl_rt_prfl_id = cmr.vrbl_rt_prfl_id)
665: and not exists (select null
664: and avr.vrbl_rt_prfl_id = cmr.vrbl_rt_prfl_id)
665: and not exists (select null
666: from ben_comp_lvl_rt_f clr,
667: ben_acty_base_rt_f abr,
668: ben_acty_vrbl_rt_f avr
669: where abr.pl_id = i.pl_id
670: and abr.acty_base_rt_id = avr.acty_base_rt_id
671: and avr.vrbl_rt_prfl_id = clr.vrbl_rt_prfl_id)
672: and not exists (select null
671: and avr.vrbl_rt_prfl_id = clr.vrbl_rt_prfl_id)
672: and not exists (select null
673: from ben_hrs_wkd_in_perd_rt_f hwr,
674: ben_acty_base_rt_f abr,
675: ben_acty_vrbl_rt_f avr
676: where abr.pl_id = i.pl_id
677: and abr.acty_base_rt_id = avr.acty_base_rt_id
678: and avr.vrbl_rt_prfl_id = hwr.vrbl_rt_prfl_id)
679: and not exists (select null
678: and avr.vrbl_rt_prfl_id = hwr.vrbl_rt_prfl_id)
679: and not exists (select null
680: from ben_los_rt_f lsr,
681: ben_acty_base_rt_f abr,
682: ben_acty_vrbl_rt_f avr
683: where abr.pl_id = i.pl_id
684: and abr.acty_base_rt_id = avr.acty_base_rt_id
685: and avr.vrbl_rt_prfl_id = lsr.vrbl_rt_prfl_id)
686: and not exists (select null
685: and avr.vrbl_rt_prfl_id = lsr.vrbl_rt_prfl_id)
686: and not exists (select null
687: from ben_pct_fl_tm_rt_f pfr,
688: ben_acty_base_rt_f abr,
689: ben_acty_vrbl_rt_f avr
690: where abr.pl_id = i.pl_id
691: and abr.acty_base_rt_id = avr.acty_base_rt_id
692: and avr.vrbl_rt_prfl_id = pfr.vrbl_rt_prfl_id)
693: and not exists (select null
785: and drvbl_fctr_apls_rts_flag = 'Y'
786: and not exists (select null
787: from ben_age_rt_f art,
788: ben_acty_base_rt_f abr,
789: ben_acty_vrbl_rt_f avr
790: where abr.plip_id = i.plip_id
791: and abr.acty_base_rt_id = avr.acty_base_rt_id
792: and avr.vrbl_rt_prfl_id = art.vrbl_rt_prfl_id)
793: and not exists (select null
792: and avr.vrbl_rt_prfl_id = art.vrbl_rt_prfl_id)
793: and not exists (select null
794: from ben_cmbn_age_los_rt_f cmr,
795: ben_acty_base_rt_f abr,
796: ben_acty_vrbl_rt_f avr
797: where abr.plip_id = i.plip_id
798: and abr.acty_base_rt_id = avr.acty_base_rt_id
799: and avr.vrbl_rt_prfl_id = cmr.vrbl_rt_prfl_id)
800: and not exists (select null
799: and avr.vrbl_rt_prfl_id = cmr.vrbl_rt_prfl_id)
800: and not exists (select null
801: from ben_comp_lvl_rt_f clr,
802: ben_acty_base_rt_f abr,
803: ben_acty_vrbl_rt_f avr
804: where abr.plip_id = i.plip_id
805: and abr.acty_base_rt_id = avr.acty_base_rt_id
806: and avr.vrbl_rt_prfl_id = clr.vrbl_rt_prfl_id)
807: and not exists (select null
806: and avr.vrbl_rt_prfl_id = clr.vrbl_rt_prfl_id)
807: and not exists (select null
808: from ben_hrs_wkd_in_perd_rt_f hwr,
809: ben_acty_base_rt_f abr,
810: ben_acty_vrbl_rt_f avr
811: where abr.plip_id = i.plip_id
812: and abr.acty_base_rt_id = avr.acty_base_rt_id
813: and avr.vrbl_rt_prfl_id = hwr.vrbl_rt_prfl_id)
814: and not exists (select null
813: and avr.vrbl_rt_prfl_id = hwr.vrbl_rt_prfl_id)
814: and not exists (select null
815: from ben_los_rt_f lsr,
816: ben_acty_base_rt_f abr,
817: ben_acty_vrbl_rt_f avr
818: where abr.plip_id = i.plip_id
819: and abr.acty_base_rt_id = avr.acty_base_rt_id
820: and avr.vrbl_rt_prfl_id = lsr.vrbl_rt_prfl_id)
821: and not exists (select null
820: and avr.vrbl_rt_prfl_id = lsr.vrbl_rt_prfl_id)
821: and not exists (select null
822: from ben_pct_fl_tm_rt_f pfr,
823: ben_acty_base_rt_f abr,
824: ben_acty_vrbl_rt_f avr
825: where abr.plip_id = i.plip_id
826: and abr.acty_base_rt_id = avr.acty_base_rt_id
827: and avr.vrbl_rt_prfl_id = pfr.vrbl_rt_prfl_id)
828: and not exists (select null
878: and drvbl_fctr_apls_rts_flag = 'Y'
879: and not exists (select null
880: from ben_age_rt_f art,
881: ben_acty_base_rt_f abr,
882: ben_acty_vrbl_rt_f avr
883: where abr.ptip_id = i.ptip_id
884: and abr.acty_base_rt_id = avr.acty_base_rt_id
885: and avr.vrbl_rt_prfl_id = art.vrbl_rt_prfl_id)
886: and not exists (select null
885: and avr.vrbl_rt_prfl_id = art.vrbl_rt_prfl_id)
886: and not exists (select null
887: from ben_cmbn_age_los_rt_f cmr,
888: ben_acty_base_rt_f abr,
889: ben_acty_vrbl_rt_f avr
890: where abr.ptip_id = i.ptip_id
891: and abr.acty_base_rt_id = avr.acty_base_rt_id
892: and avr.vrbl_rt_prfl_id = cmr.vrbl_rt_prfl_id)
893: and not exists (select null
892: and avr.vrbl_rt_prfl_id = cmr.vrbl_rt_prfl_id)
893: and not exists (select null
894: from ben_comp_lvl_rt_f clr,
895: ben_acty_base_rt_f abr,
896: ben_acty_vrbl_rt_f avr
897: where abr.ptip_id = i.ptip_id
898: and abr.acty_base_rt_id = avr.acty_base_rt_id
899: and avr.vrbl_rt_prfl_id = clr.vrbl_rt_prfl_id)
900: and not exists (select null
899: and avr.vrbl_rt_prfl_id = clr.vrbl_rt_prfl_id)
900: and not exists (select null
901: from ben_hrs_wkd_in_perd_rt_f hwr,
902: ben_acty_base_rt_f abr,
903: ben_acty_vrbl_rt_f avr
904: where abr.ptip_id = i.ptip_id
905: and abr.acty_base_rt_id = avr.acty_base_rt_id
906: and avr.vrbl_rt_prfl_id = hwr.vrbl_rt_prfl_id)
907: and not exists (select null
906: and avr.vrbl_rt_prfl_id = hwr.vrbl_rt_prfl_id)
907: and not exists (select null
908: from ben_los_rt_f lsr,
909: ben_acty_base_rt_f abr,
910: ben_acty_vrbl_rt_f avr
911: where abr.ptip_id = i.ptip_id
912: and abr.acty_base_rt_id = avr.acty_base_rt_id
913: and avr.vrbl_rt_prfl_id = lsr.vrbl_rt_prfl_id)
914: and not exists (select null
913: and avr.vrbl_rt_prfl_id = lsr.vrbl_rt_prfl_id)
914: and not exists (select null
915: from ben_pct_fl_tm_rt_f pfr,
916: ben_acty_base_rt_f abr,
917: ben_acty_vrbl_rt_f avr
918: where abr.ptip_id = i.ptip_id
919: and abr.acty_base_rt_id = avr.acty_base_rt_id
920: and avr.vrbl_rt_prfl_id = pfr.vrbl_rt_prfl_id);
921: --
929: and drvbl_fctr_apls_rts_flag = 'Y'
930: and not exists (select null
931: from ben_age_rt_f art,
932: ben_acty_base_rt_f abr,
933: ben_acty_vrbl_rt_f avr
934: where abr.oipl_id = i.oipl_id
935: and abr.acty_base_rt_id = avr.acty_base_rt_id
936: and avr.vrbl_rt_prfl_id = art.vrbl_rt_prfl_id)
937: and not exists (select null
936: and avr.vrbl_rt_prfl_id = art.vrbl_rt_prfl_id)
937: and not exists (select null
938: from ben_cmbn_age_los_rt_f cmr,
939: ben_acty_base_rt_f abr,
940: ben_acty_vrbl_rt_f avr
941: where abr.oipl_id = i.oipl_id
942: and abr.acty_base_rt_id = avr.acty_base_rt_id
943: and avr.vrbl_rt_prfl_id = cmr.vrbl_rt_prfl_id)
944: and not exists (select null
943: and avr.vrbl_rt_prfl_id = cmr.vrbl_rt_prfl_id)
944: and not exists (select null
945: from ben_comp_lvl_rt_f clr,
946: ben_acty_base_rt_f abr,
947: ben_acty_vrbl_rt_f avr
948: where abr.oipl_id = i.oipl_id
949: and abr.acty_base_rt_id = avr.acty_base_rt_id
950: and avr.vrbl_rt_prfl_id = clr.vrbl_rt_prfl_id)
951: and not exists (select null
950: and avr.vrbl_rt_prfl_id = clr.vrbl_rt_prfl_id)
951: and not exists (select null
952: from ben_hrs_wkd_in_perd_rt_f hwr,
953: ben_acty_base_rt_f abr,
954: ben_acty_vrbl_rt_f avr
955: where abr.oipl_id = i.oipl_id
956: and abr.acty_base_rt_id = avr.acty_base_rt_id
957: and avr.vrbl_rt_prfl_id = hwr.vrbl_rt_prfl_id)
958: and not exists (select null
957: and avr.vrbl_rt_prfl_id = hwr.vrbl_rt_prfl_id)
958: and not exists (select null
959: from ben_los_rt_f lsr,
960: ben_acty_base_rt_f abr,
961: ben_acty_vrbl_rt_f avr
962: where abr.oipl_id = i.oipl_id
963: and abr.acty_base_rt_id = avr.acty_base_rt_id
964: and avr.vrbl_rt_prfl_id = lsr.vrbl_rt_prfl_id)
965: and not exists (select null
964: and avr.vrbl_rt_prfl_id = lsr.vrbl_rt_prfl_id)
965: and not exists (select null
966: from ben_pct_fl_tm_rt_f pfr,
967: ben_acty_base_rt_f abr,
968: ben_acty_vrbl_rt_f avr
969: where abr.oipl_id = i.oipl_id
970: and abr.acty_base_rt_id = avr.acty_base_rt_id
971: and avr.vrbl_rt_prfl_id = pfr.vrbl_rt_prfl_id)
972: and not exists (select null