The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT trunc(dbi_SES_DTE,'Month')
INTO nti_CurMthStrtDte
FROM dual;
SELECT last_day(dbi_SES_DTE)
INTO nti_CurMthEndDte
FROM dual;
SELECT pbt.balance_type_id
INTO l_BalTypId
FROM pay_balance_types pbt
WHERE pbt.balance_name = p_BalNme
AND pbt.legislation_code = 'ZA';
SELECT pbt.balance_type_id
INTO l_BalTypId
FROM pay_balance_types pbt
WHERE pbt.balance_name = p_BalNme;
select paei.AEI_INFORMATION8
into trc_PenBasis
from per_assignment_extra_info paei
where paei.assignment_id = con_ASG_ID
and paei.information_type = 'ZA_SPECIFIC_INFO';
Select count(*)
into l_lmsm_proc_cnt
from
pay_balance_feeds_f FEED,
pay_run_result_values TARGET,
pay_run_results RR,
pay_payroll_actions PACT,
pay_assignment_actions ASSACT,
pay_payroll_actions BACT,
pay_assignment_actions BAL_ASSACT
where FEED.BALANCE_TYPE_ID = (
select BALANCE_TYPE_ID
from pay_balance_types
where balance_name= 'Tax on Lump Sums'
and legislation_code = 'ZA') -- Balance_type_id for Tax on Lump Sums
and BAL_ASSACT.assignment_action_id = con_ASG_ACT_ID
and BAL_ASSACT.payroll_action_id = BACT.payroll_action_id
and FEED.input_value_id = TARGET.input_value_id
and TARGET.run_result_id = RR.run_result_id
and RR.assignment_action_id = ASSACT.assignment_action_id
and ASSACT.payroll_action_id = PACT.payroll_action_id
and PACT.effective_date between FEED.effective_start_date
and FEED.effective_end_date
and RR.status in ('P','PA')
and PACT.time_period_id = BACT.time_period_id
and ASSACT.action_sequence <= BAL_ASSACT.action_sequence
and ASSACT.assignment_id = BAL_ASSACT.assignment_id;
Select count(*)
into l_ret_lmsm_proc_cnt
from
pay_balance_feeds_f FEED,
pay_run_result_values TARGET,
pay_run_results RR,
pay_payroll_actions PACT,
pay_assignment_actions ASSACT,
pay_payroll_actions BACT,
pay_assignment_actions BAL_ASSACT
where FEED.BALANCE_TYPE_ID = (
select BALANCE_TYPE_ID
from pay_balance_types
where balance_name= 'Tax on Retirement Fund Lump Sums'
and legislation_code = 'ZA') -- Balance_type_id for Tax on Retirement Fund Lump Sums
and BAL_ASSACT.assignment_action_id = con_ASG_ACT_ID
and BAL_ASSACT.payroll_action_id = BACT.payroll_action_id
and FEED.input_value_id = TARGET.input_value_id
and TARGET.run_result_id = RR.run_result_id
and RR.assignment_action_id = ASSACT.assignment_action_id
and ASSACT.payroll_action_id = PACT.payroll_action_id
and PACT.effective_date between FEED.effective_start_date
and FEED.effective_end_date
and RR.status in ('P','PA')
and PACT.time_period_id = BACT.time_period_id
and ASSACT.action_sequence <= BAL_ASSACT.action_sequence
and ASSACT.assignment_id = BAL_ASSACT.assignment_id;