The following lines contain the word 'select', 'insert', 'update' or 'delete':
select input_value_id into CP_NI_Input_Value_ID from
pay_element_types_x pet,
pay_input_values_x piv
where pet.system_element_name = 'NI'
and piv.system_name = 'Category'
and pet.element_type_id = piv.element_type_id
and pet.legislation_code = 'GB';
select piv.input_value_id,piv2.input_value_id
into CP_Tax_Code_Input_Value_ID ,CP_Tax_Basis_Input_Value_ID from
pay_element_types_x pet,
pay_input_values_x piv,
pay_input_values_x piv2
where pet.system_element_name = 'PAYE'
and piv.system_name = 'Tax Code'
and piv2.system_name = 'Tax Basis'
and pet.element_type_id = piv.element_type_id
and pet.element_type_id = piv2.element_type_id
and pet.legislation_code = 'GB';
select piv.input_value_id,piv2.input_value_id
into CP_Tax_Code_Input_Value_ID ,CP_Tax_Basis_Input_Value_ID from
pay_element_types_x pet,
pay_input_values_x piv,
pay_input_values_x piv2
where pet.system_element_name = 'PAYE Details'
and piv.system_name = 'Tax Code'
and piv2.system_name = 'Tax Basis'
and pet.element_type_id = piv.element_type_id
and pet.element_type_id = piv2.element_type_id
and pet.legislation_code = 'GB';
select LEGISLATION_CODE
into P_LEGISLATION_CODE
from per_business_groups
where BUSINESS_GROUP_ID = P_BUSINESS_GROUP_ID;
select distinct PAYROLL_NAME
into CP_PAYROLL_NAME
from PAY_PAYROLLS_F
where payroll_id = P_PAYROLL_ID;
select PERIOD_NAME
into CP_Time_Period_Time
from PER_TIME_PERIODS
where time_period_id = P_TIME_PERIOD_ID;
select CONSOLIDATION_SET_NAME
into CP_CONSOLIDATION_SET_NAME
from PAY_CONSOLIDATION_SETS
where CONSOLIDATION_SET_ID = P_CONSOLIDATION_SET_ID;