The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
alias_definition_id
,alias_definition_name
,description
,prompt
,language
,source_lang
from hxc_alias_definitions_tl
where alias_definition_id = p_alias_definition_id
and language = p_language;
select
alias_definition_id
,alias_definition_name
,description
,prompt
,language
,source_lang
from hxc_alias_definitions_tl
where alias_definition_id = p_alias_definition_id
and language = p_language
for update nowait;
delete from hxc_alias_definitions_tl t
where not exists
(select null
from hxc_alias_definitions b
where b.alias_definition_id = t.alias_definition_id
);
update hxc_alias_definitions_tl t
set (alias_definition_name
,description)
=
(select b.alias_definition_name
,b.description
from hxc_alias_definitions_tl b
where b.alias_definition_id = t.alias_definition_id
and b.language = t.source_lang)
where (t.alias_definition_id
,t.language)
in (select subt.alias_definition_id
,subt.language
from hxc_alias_definitions_tl subb
,hxc_alias_definitions_tl subt
where subb.alias_definition_id = subt.alias_definition_id
and subb.language = subt.source_lang
and (subb.alias_definition_name <> subt.alias_definition_name
or subb.description <> subt.description
or (subb.description is null and subt.description is not null)
or (subb.description is not null and subt.description is null)
)
);
insert into hxc_alias_definitions_tl
(ALIAS_DEFINITION_ID
,ALIAS_DEFINITION_NAME
,DESCRIPTION
,PROMPT
,LANGUAGE
,SOURCE_LANG
,LAST_UPDATE_DATE
,LAST_UPDATED_BY
,LAST_UPDATE_LOGIN
,CREATED_BY
,CREATION_DATE
)
select b.alias_definition_id
,b.alias_definition_name
,b.description
,b.prompt
,l.language_code
,b.source_lang
,b.last_update_date
,b.last_updated_by
,b.last_update_login
,b.created_by
,b.creation_date
from hxc_alias_definitions_tl b
,fnd_languages l
where l.installed_flag in ('I', 'B')
and b.language = userenv('LANG')
and not exists
(select null
from hxc_alias_definitions_tl t
where t.alias_definition_id = b.alias_definition_id
and t.language = l.language_code
);