The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
balance_type_id
,balance_name
,reporting_name
,language
,source_lang
from pay_balance_types_tl
where balance_type_id = p_balance_type_id
and language = p_language;
select
balance_type_id
,balance_name
,reporting_name
,language
,source_lang
from pay_balance_types_tl
where balance_type_id = p_balance_type_id
and language = p_language
for update nowait;
delete from PAY_BALANCE_TYPES_TL T
where not exists
(select NULL
from PAY_BALANCE_TYPES B
where B.BALANCE_TYPE_ID = T.BALANCE_TYPE_ID
);
update PAY_BALANCE_TYPES_TL T set (
BALANCE_NAME,
REPORTING_NAME
) = (select
B.BALANCE_NAME,
B.REPORTING_NAME
from PAY_BALANCE_TYPES_TL B
where B.BALANCE_TYPE_ID = T.BALANCE_TYPE_ID
and B.LANGUAGE = T.SOURCE_LANG)
where (
T.BALANCE_TYPE_ID,
T.LANGUAGE
) in (select
SUBT.BALANCE_TYPE_ID,
SUBT.LANGUAGE
from PAY_BALANCE_TYPES_TL SUBB, PAY_BALANCE_TYPES_TL SUBT
where SUBB.BALANCE_TYPE_ID = SUBT.BALANCE_TYPE_ID
and SUBB.LANGUAGE = SUBT.SOURCE_LANG
and (SUBB.BALANCE_NAME <> SUBT.BALANCE_NAME
or SUBB.REPORTING_NAME <> SUBT.REPORTING_NAME
or (SUBB.REPORTING_NAME is null and SUBT.REPORTING_NAME is not null)
or (SUBB.REPORTING_NAME is not null and SUBT.REPORTING_NAME is null)
));
insert into PAY_BALANCE_TYPES_TL (
BALANCE_TYPE_ID,
BALANCE_NAME,
REPORTING_NAME,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN,
CREATED_BY,
CREATION_DATE,
LANGUAGE,
SOURCE_LANG
) select /*+ ORDERED */
B.BALANCE_TYPE_ID,
B.BALANCE_NAME,
B.REPORTING_NAME,
B.LAST_UPDATE_DATE,
B.LAST_UPDATED_BY,
B.LAST_UPDATE_LOGIN,
B.CREATED_BY,
B.CREATION_DATE,
L.LANGUAGE_CODE,
B.SOURCE_LANG
from PAY_BALANCE_TYPES_TL B, FND_LANGUAGES L
where L.INSTALLED_FLAG in ('I', 'B')
and B.LANGUAGE = userenv('LANG')
and not exists
(select NULL
from PAY_BALANCE_TYPES_TL T
where T.BALANCE_TYPE_ID = B.BALANCE_TYPE_ID
and T.LANGUAGE = L.LANGUAGE_CODE);