The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
recruiting_site_id
,language
,source_lang
,site_name
,redirection_url
,''
,posting_url
,''
from irc_all_recruiting_sites_tl
where recruiting_site_id = p_recruiting_site_id
and language = p_language;
select
recruiting_site_id
,language
,source_lang
,site_name
,redirection_url
,''
,posting_url
,''
from irc_all_recruiting_sites_tl
where recruiting_site_id = p_recruiting_site_id
and language = p_language
for update nowait;
delete from IRC_ALL_RECRUITING_SITES_TL T
where not exists
(select NULL
from IRC_ALL_RECRUITING_SITES B
where B.RECRUITING_SITE_ID = T.RECRUITING_SITE_ID
);
update IRC_ALL_RECRUITING_SITES_TL T set (
SITE_NAME,
REDIRECTION_URL,
POSTING_URL
) = (select
B.SITE_NAME,
B.REDIRECTION_URL,
B.POSTING_URL
from IRC_ALL_RECRUITING_SITES_TL B
where B.RECRUITING_SITE_ID = T.RECRUITING_SITE_ID
and B.LANGUAGE = T.SOURCE_LANG)
where (
T.RECRUITING_SITE_ID,
T.LANGUAGE
) in (select
SUBT.RECRUITING_SITE_ID,
SUBT.LANGUAGE
from IRC_ALL_RECRUITING_SITES_TL SUBB, IRC_ALL_RECRUITING_SITES_TL SUBT
where SUBB.RECRUITING_SITE_ID = SUBT.RECRUITING_SITE_ID
and SUBB.LANGUAGE = SUBT.SOURCE_LANG
and (SUBB.SITE_NAME <> SUBT.SITE_NAME
or dbms_lob.compare(SUBB.REDIRECTION_URL,SUBT.REDIRECTION_URL) <> 0
or (SUBB.REDIRECTION_URL is null and SUBT.REDIRECTION_URL is not null)
or (SUBB.REDIRECTION_URL is not null and SUBT.REDIRECTION_URL is null)
or dbms_lob.compare(SUBB.POSTING_URL,SUBT.POSTING_URL) <> 0
or (SUBB.POSTING_URL is null and SUBT.POSTING_URL is not null)
or (SUBB.POSTING_URL is not null and SUBT.POSTING_URL is null)
));
insert into IRC_ALL_RECRUITING_SITES_TL (
SITE_NAME,
REDIRECTION_URL,
POSTING_URL,
RECRUITING_SITE_ID,
LANGUAGE,
SOURCE_LANG
) select /*+ ORDERED */
B.SITE_NAME,
B.REDIRECTION_URL,
B.POSTING_URL,
B.RECRUITING_SITE_ID,
L.LANGUAGE_CODE,
B.SOURCE_LANG
from IRC_ALL_RECRUITING_SITES_TL B, FND_LANGUAGES L
where L.INSTALLED_FLAG in ('I', 'B')
and B.LANGUAGE = userenv('LANG')
and not exists
(select NULL
from IRC_ALL_RECRUITING_SITES_TL T
where T.RECRUITING_SITE_ID = B.RECRUITING_SITE_ID
and T.LANGUAGE = L.LANGUAGE_CODE);