The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
actn_typ_id,
business_group_id,
type_cd,
name,
description,
eat_attribute_category,
eat_attribute1,
eat_attribute2,
eat_attribute3,
eat_attribute4,
eat_attribute5,
eat_attribute6,
eat_attribute7,
eat_attribute8,
eat_attribute9,
eat_attribute10,
eat_attribute11,
eat_attribute12,
eat_attribute13,
eat_attribute14,
eat_attribute15,
eat_attribute16,
eat_attribute17,
eat_attribute18,
eat_attribute19,
eat_attribute20,
eat_attribute21,
eat_attribute22,
eat_attribute23,
eat_attribute24,
eat_attribute25,
eat_attribute26,
eat_attribute27,
eat_attribute28,
eat_attribute29,
eat_attribute30,
object_version_number
from ben_actn_typ
where actn_typ_id = p_actn_typ_id;
select actn_typ_id,
business_group_id,
type_cd,
name,
description,
eat_attribute_category,
eat_attribute1,
eat_attribute2,
eat_attribute3,
eat_attribute4,
eat_attribute5,
eat_attribute6,
eat_attribute7,
eat_attribute8,
eat_attribute9,
eat_attribute10,
eat_attribute11,
eat_attribute12,
eat_attribute13,
eat_attribute14,
eat_attribute15,
eat_attribute16,
eat_attribute17,
eat_attribute18,
eat_attribute19,
eat_attribute20,
eat_attribute21,
eat_attribute22,
eat_attribute23,
eat_attribute24,
eat_attribute25,
eat_attribute26,
eat_attribute27,
eat_attribute28,
eat_attribute29,
eat_attribute30,
object_version_number
from ben_actn_typ
where actn_typ_id = p_actn_typ_id
for update nowait;
delete from ben_actn_typ_tl t
where not exists
(select null
from ben_actn_typ_tl b
where b.actn_typ_id = t.actn_typ_id
);
update ben_actn_typ_tl t set (
name,
description,
type_cd
) = (select
b.name,
b.description,
b.type_cd
from ben_actn_typ_tl b
where b.actn_typ_id = t.actn_typ_id
and b.language = t.source_lang)
where (
t.actn_typ_id,
t.language
) in (select
subt.actn_typ_id,
subt.language
from ben_actn_typ_tl subb, ben_actn_typ_tl subt
where subb.actn_typ_id = subt.actn_typ_id
and subb.language = subt.source_lang
and (subb.name <> subt.name
or subb.description <> subt.description
or subb.type_cd <> subt.type_cd
));
insert into ben_actn_typ_tl (
actn_typ_id,
name,
description,
language,
type_cd,
source_lang,
last_update_date,
last_updated_by,
last_update_login,
created_by,
creation_date
) select
b.actn_typ_id,
b.name,
b.description,
l.language_code,
b.type_cd,
b.source_lang,
b.last_update_date,
b.last_updated_by,
b.last_update_login,
b.created_by,
b.creation_date
from ben_actn_typ_tl b, fnd_languages l
where l.installed_flag in ('I', 'B')
and b.language = userenv('LANG')
and not exists
(select null
from ben_actn_typ_tl t
where t.actn_typ_id = b.actn_typ_id
and t.language = l.language_code);