The following lines contain the word 'select', 'insert', 'update' or 'delete':
select pep.elig_per_id,
pep.elig_flag,
pep.prtn_strt_dt,
pep.prtn_end_dt,
pep.per_in_ler_id,
pep.object_version_number,
pep.age_val,
pep.los_val
from ben_elig_per_f pep,
ben_per_in_ler pil
where pep.person_id = c_person_id
and nvl(pep.pgm_id,-1) = c_pgm_id
and nvl(pep.pl_id,-1) = c_pl_id
and pep.plip_id is null
and nvl(pep.ptip_id,-1) = c_ptip_id
and c_effective_date
between pep.effective_start_date
and pep.effective_end_date
and pil.per_in_ler_id(+)=pep.per_in_ler_id
and pil.business_group_id(+)=pep.business_group_id
and ( pil.per_in_ler_stat_cd not in ('VOIDD','BCKDT') -- found row condition
or pil.per_in_ler_stat_cd is null -- outer join condition
)
and nvl(pil.assignment_id, -9999) = decode (c_mode_cd,
'I',
c_irec_asg_id,
nvl(pil.assignment_id, -9999));
select epo.elig_per_opt_id,
epo.elig_flag,
epo.prtn_strt_dt,
epo.prtn_end_dt,
epo.object_version_number,
pep.elig_per_id,
epo.per_in_ler_id,
pep.prtn_strt_dt,
pep.prtn_end_dt,
epo.age_val,
epo.los_val
from ben_elig_per_opt_f epo,
ben_per_in_ler pil,
ben_elig_per_f pep
where pep.person_id = c_person_id
and pep.pl_id = c_pl_id
and epo.opt_id = c_opt_id
and pep.elig_per_id = epo.elig_per_id
and pep.pgm_id is null
and c_effective_date
between pep.effective_start_date
and pep.effective_end_date
and c_effective_date
between epo.effective_start_date
and epo.effective_end_date
and pil.per_in_ler_id(+)=epo.per_in_ler_id
and pil.business_group_id(+)=epo.business_group_id
and ( pil.per_in_ler_stat_cd not in ('VOIDD','BCKDT')
or pil.per_in_ler_stat_cd is null)
and nvl(pil.assignment_id,-9999) = decode ( c_mode_cd,
'I',
c_irec_asg_id,
nvl(pil.assignment_id, -9999) ); -- iRec : Match assignment_id for iRec