Search This Blog

Tuesday, January 29, 2013

Rate Details in Oracle Advanced Benefits

SELECT pap.employee_number, pln.NAME "Plan", opt.NAME "Option",
       prtt.enrt_cvg_strt_dt "Coverage Start Date",
       prtt.bnft_amt "Coverage Amount", rte.rt_val "Defined Amount",
       rte.cmcd_rt_val "Communicated Amount", ann_rt_val "Annual Rate Value",
       acty_typ_cd "Activity Type", tx_typ_cd "Tax Type",
       rt_typ_cd "Rate Type"
  FROM ben_prtt_enrt_rslt_f prtt,
       per_all_people_f pap,
       ben_oipl_f oipl,
       ben_pl_f pln,
       ben_opt_f opt,
       ben_prtt_rt_val rte
 WHERE pap.person_id = prtt.person_id
   AND prtt.oipl_id = oipl.oipl_id
   AND oipl.pl_id = pln.pl_id
   AND opt.opt_id = oipl.opt_id
   AND prtt.prtt_enrt_rslt_id = rte.prtt_enrt_rslt_id
   AND prtt.prtt_enrt_rslt_stat_cd IS NULL
   AND prtt.sspndd_flag = 'N'
   AND pap.person_id = prtt.person_id
   AND SYSDATE BETWEEN prtt.enrt_cvg_strt_dt AND prtt.enrt_cvg_thru_dt
   AND enrt_cvg_thru_dt <= prtt.effective_end_date
   AND SYSDATE BETWEEN pap.effective_start_date AND pap.effective_end_date
   AND SYSDATE BETWEEN pln.effective_start_date AND pln.effective_end_date
   AND SYSDATE BETWEEN oipl.effective_start_date AND oipl.effective_end_date
   AND SYSDATE BETWEEN opt.effective_start_date AND opt.effective_end_date
   AND SYSDATE BETWEEN rte.rt_strt_dt AND rte.rt_end_dt
--and pln.name = ('Health Savings Account')
   AND opt.NAME <> 'Waive'
   AND employee_number = '17578'
   AND acty_typ_cd = 'ERPYC'
 

No comments:

Post a Comment