The following lines contain the word 'select', 'insert', 'update' or 'delete':
11 May 00 S Tee 115.1 Insert into MLS table.
*/
--------------------------------------------------------------------------------
--
g_package varchar2(80) := 'ben_seed_regulations';
insert into ben_regn_f
(regn_id,
effective_start_date,
effective_end_date,
name,
sttry_citn_name,
business_group_id,
object_version_number)
select
ben_regn_f_s.nextval,
to_date('01-01-1950','DD-MM-YYYY'),
to_date('31-12-4712','DD-MM-YYYY'),
name,
sttry_citn_name,
p_business_group_id,
1
from ben_startup_regn s_reg
where not exists (select 1
from ben_regn_f reg
where s_reg.sttry_citn_name = reg.sttry_citn_name
and reg.business_group_id = p_business_group_id
);
insert into ben_regn_f_tl (
regn_id,
effective_start_date,
effective_end_date,
name,
sttry_citn_name,
language,
source_lang,
last_update_date,
last_updated_by,
last_update_login,
created_by,
creation_date
) select
b.regn_id,
b.effective_start_date,
b.effective_end_date,
tl.name,
tl.sttry_citn_name,
tl.language,
tl.source_lang,
b.last_update_date,
b.last_updated_by,
b.last_update_login,
b.created_by,
b.creation_date
from ben_regn_f b
,ben_startup_regn_tl tl
where b.business_group_id = p_business_group_id
and b.sttry_citn_name = tl.sttry_citn_name
and not exists
(select 'Y'
from ben_regn_f_tl t
where t.regn_id = b.regn_id
and t.effective_start_date = b.effective_start_date
and t.source_lang = userenv('LANG'));