The following lines contain the word 'select', 'insert', 'update' or 'delete':
115.15 13-Nov-06 rtagarra Closed the worker and updated the step to C_RECAL from
C_UPDATE.
-----------------------------------------------------------------------------
*/
--
-- Globals.
--
g_package varchar2(50) := 'ben_efc_validation.';
SELECT count(*)
FROM ben_batch_ranges bbr,
ben_benefit_actions bft
WHERE bbr.benefit_action_id = bft.benefit_action_id
and bft.business_group_id = c_bg
and bbr.range_status_cd = 'U'
group by bbr.benefit_action_id;
SELECT bft.benefit_action_id,
bft.process_date,
bft.mode_cd,
bft.pgm_id,
bft.derivable_factors_flag,
bft.close_uneai_flag,
bft.no_programs_flag,
bft.no_plans_flag,
bft.validate_flag,
count(*)
FROM ben_person_actions act,
ben_benefit_actions bft
WHERE act.benefit_action_id = bft.benefit_action_id
and bft.business_group_id = c_bg
and act.ACTION_STATUS_CD = 'U'
and act.non_person_cd is null -- Bug 5042850
group by bft.benefit_action_id,
bft.process_date,
bft.mode_cd,
bft.pgm_id,
bft.derivable_factors_flag,
bft.close_uneai_flag,
bft.no_programs_flag,
bft.no_plans_flag,
bft.validate_flag
having count(*) > 1
order by bft.benefit_action_id desc;
select rst.ext_rslt_id
from ben_ext_rslt rst
where rst.eff_dt = c_eff_date
and rst.business_group_id = c_bgp_id
and rst.ext_dfn_id = c_ext_dfn_id;
hr_efc_info.insert_line('-- ');
hr_efc_info.insert_line
('-- Re-calculating/adjusting in validate mode with no actions ');
hr_efc_info.insert_line('-- ');
hr_efc_info.insert_line('-- ');
hr_efc_info.insert_line
('-- Re-calculating/adjusting converted monetary values phase '||p_multithread_substep);
hr_efc_info.insert_line('-- ');
hr_efc_info.insert_line('-- ');
hr_efc_info.insert_line
('-- Re-calculating/adjusting converted monetary values for all phases ');
hr_efc_info.insert_line('-- ');
hr_efc_info.insert_or_select_comp_row
(p_action_id => l_action_id
,p_process_component_name => l_proccomp_name
,p_table_name => l_table
,p_total_workers => l_total_workers
,p_worker_id => l_worker_id
,p_step => 'C_RECAL'
,p_sub_step => p_multithread_substep
,p_process_component_id => l_efc_component_id
);
hr_efc_info.insert_or_select_worker_row
(p_process_component_id => l_efc_component_id
,p_process_component_name => l_proccomp_name
,p_action_id => l_action_id
,p_worker_number => l_worker_id
--
,p_pk1 => l_pk1
,p_pk2 => l_pk2char
,p_pk3 => l_pk3char
,p_pk4 => l_pk4char
,p_pk5 => l_pk5char
,p_status => l_status
--
,p_efc_worker_id => l_efc_worker_id
);
delete from ben_efc_exclusions
where efc_action_id = l_action_id;
hr_efc_info.insert_line('-- ');
hr_efc_info.insert_line('-- Check for uncomplete benefit actions in BEN_BENEFIT_ACTIONS table...');
hr_efc_info.insert_line('-- ');
hr_efc_info.insert_line('-- Uncompleted batch information identified for the following');
hr_efc_info.insert_line('-- rows in ben_benefit_actions ');
hr_efc_info.insert_line('-- ');
hr_efc_info.insert_line('-- Benefit Action ID /Mode Cd /Process date /Person Action Count');
hr_efc_info.insert_line('-- ');
hr_efc_info.insert_line('-- '||l_bftid_va(elenum)
||' /'||l_bftmdcd_va(elenum)
||' /'||l_bftprdt_va(elenum)
||' /'||l_cnt_va(elenum)
);
hr_efc_info.insert_line('-- ');
hr_efc_info.insert_line('-- The uncompleted benefit actions above need to be resolved. Use ');
hr_efc_info.insert_line('-- the restart process to complete. ');
hr_efc_info.insert_line('-- ');
hr_efc_info.insert_line('-- ');
hr_efc_info.insert_line('-- Detected '||l_bftext_cnt||' Extracts. ');
hr_efc_info.insert_line('-- No Actions required ');
hr_efc_info.insert_line('-- ');