The following lines contain the word 'select', 'insert', 'update' or 'delete':
26-JAN-99 AHANDA 40.7/110.3 Changed script to delete only formulas which
it is creating. Moved delete statement
inside the loop.
16-jun-99 achauhan 110.5 Changed dbms_output to
hr_utility.trace
*/
--
/**/
----------------------------------------------------------------------------------------
-- Name
-- setup
-- Purpose
-- Seeds formula data in ff_formulas_f table for 1099R federal formulas.
-- Arguments
-- None
-- Notes
----------------------------------------------------------------------------------------
--
PROCEDURE Setup IS
--
-- Define table structures to hold parameter details.
--
-- note: we are only inserting into the ff_formulas_f table.
-- The only fields that we have to cater for are the following :
-- LEGISLATION_CODE
-- FORMULA_TYPE_ID
-- FORMULA_NAME
-- DESCRIPTION
--
l_formula_name_table char80_data_table;
select formula_type_id
from ff_formula_types fft
where fft.formula_type_name = 'Oracle Payroll';
l_message := 'Attempting to delete previous definitions of 1099R federal
formulas from FF_COMPILED_INFO_F for formula - ' ||
l_formula_name_table(l_count);
delete from ff_compiled_info_f fci
where fci.formula_id in (select ff.formula_id
from ff_formulas_f ff
where formula_name = l_formula_name_table(l_count));
l_message := 'Attempting to delete previous definitions of 1099R federal
formulas from FF_FDI_USAGES_F for formula - ' ||
l_formula_name_table(l_count);
delete from ff_fdi_usages_f
where formula_id in (select formula_id
from ff_formulas_f
where formula_name = l_formula_name_table(l_count));
hr_utility.trace('Attempting to delete previous definitions of 1099R federal
formulas from FF_FORMULAS_F');
l_message := 'Attempting to delete previous definitions of 1099R federal
formulas from FF_FORMULAS_F for formula name - '||
l_formula_name_table(l_count);
delete from ff_formulas_f ff
where ff.formula_name = l_formula_name_table(l_count);
select ff_formulas_s.nextval
into l_formula_id
from sys.dual;
insert into ff_formulas_f
(FORMULA_ID,
EFFECTIVE_START_DATE,
EFFECTIVE_END_DATE,
BUSINESS_GROUP_ID,
LEGISLATION_CODE,
FORMULA_TYPE_ID,
FORMULA_NAME,
DESCRIPTION,
FORMULA_TEXT,
STICKY_FLAG,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN,
CREATED_BY,
CREATION_DATE)
values
(l_formula_id,
pay_1099R_formula_driver.c_start_of_time,
pay_1099R_formula_driver.c_end_of_time,
null,
l_legislation_code,
l_formula_type_id,
l_formula_name_table(l_count),
l_description_table(l_count),
null,
null,
null,
null,
null,
null,
null);