The following lines contain the word 'select', 'insert', 'update' or 'delete':
select 1
from ben_per_info_chg_cs_ler_f psl
where psl.business_group_id = c_business_group_id
and c_effective_date
between psl.effective_start_date and psl.effective_end_date
and psl.source_table = c_source_table;
select 1
from ben_rltd_per_chg_cs_ler_f rpc
where rpc.business_group_id = c_business_group_id
and c_effective_date
between rpc.effective_start_date and rpc.effective_end_date
and rpc.source_table = c_source_table;
select ler.ler_id
, ler.typ_cd
, ler.ocrd_dt_det_cd
from ben_ler_f ler
where ler.business_group_id = c_business_group_id
and c_effective_date between ler.effective_start_date
and ler.effective_end_date
and ( c_status = 'I' or ler.typ_cd in ('COMP','GSP','ABS','CHECKLIST') )
and ((exists
(select 1
from ben_per_info_chg_cs_ler_f psl
, ben_ler_per_info_cs_ler_f lpl
where source_table = c_source_table
and psl.per_info_chg_cs_ler_id = lpl.per_info_chg_cs_ler_id
and lpl.business_group_id = psl.business_group_id
and lpl.business_group_id = ler.business_group_id
and c_effective_date between psl.effective_start_date
and psl.effective_end_date
and lpl.ler_id = ler.ler_id)
)
OR (exists
(select 1
from ben_rltd_per_chg_cs_ler_f rpc
, ben_ler_rltd_per_cs_ler_f lrp
where source_table = c_source_table
and lrp.business_group_id = rpc.business_group_id
and lrp.business_group_id = ler.business_group_id
and c_effective_date between rpc.effective_start_date
and rpc.effective_end_date
and rpc.rltd_per_chg_cs_ler_id = lrp.rltd_per_chg_cs_ler_id
and lrp.ler_id = ler.ler_id)
))
order by ler.ler_id;
SELECT ler.ler_id,
ler.typ_cd,
ler.ocrd_dt_det_cd
FROM ben_ler_f ler
WHERE ler.business_group_id = c_business_group_id
AND c_effective_date BETWEEN ler.effective_start_date
AND ler.effective_end_date
AND ( l_status = 'I' or ler.typ_cd in ('COMP','GSP','ABS','CHECKLIST') )
AND (
(
EXISTS
(SELECT 1
FROM ben_per_info_chg_cs_ler_f psl,
ben_ler_per_info_cs_ler_f lpl
WHERE psl.source_table = 'BEN_ELIG_DPNT'
AND psl.per_info_chg_cs_ler_id =
lpl.per_info_chg_cs_ler_id
AND c_effective_date BETWEEN psl.effective_start_date
AND psl.effective_end_date
AND lpl.ler_id = ler.ler_id
AND c_effective_date BETWEEN lpl.effective_start_date
AND lpl.effective_end_date)
)
OR (
EXISTS
(SELECT 1
FROM ben_ler_rltd_per_cs_ler_f lrp,
ben_rltd_per_chg_cs_ler_f rpc
WHERE rpc.source_table = 'BEN_ELIG_DPNT'
AND c_effective_date BETWEEN rpc.effective_start_date
AND rpc.effective_end_date
AND rpc.rltd_per_chg_cs_ler_id =
lrp.rltd_per_chg_cs_ler_id
AND lrp.ler_id = ler.ler_id
AND c_effective_date BETWEEN lrp.effective_start_date
AND lrp.effective_end_date)
));
g_prvlertrg_instance.delete;
g_penlertrg_instance.delete;
g_egdlertrg_instance.delete;
g_prvlertrg_instance.delete;
g_penlertrg_instance.delete;
g_egdlertrg_instance.delete;
g_prvlertrg_instance.delete;
g_penlertrg_instance.delete;