The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
location_id,
language,
source_lang,
location_code,
description
from hr_locations_all_tl
where location_id = p_location_id
and language = p_language;
select location_id,
language,
source_lang,
location_code,
description
from hr_locations_all_tl
where location_id = p_location_id
and language = p_language
for update nowait;
delete from hr_locations_all_tl t
where not exists
( select null
from hr_locations_all b
where b.location_id = t.location_id
);
update hr_locations_all_tl t
set ( location_code,
description ) =
( select b.location_code,
b.description
from hr_locations_all_tl b
where b.location_id = t.location_id
and b.language = t.source_lang )
where ( t.location_id,
t.language
) in
( select subt.location_id,
subt.language
from hr_locations_all_tl subb, hr_locations_all_tl subt
where subb.location_id = subt.location_id
and subb.language = subt.source_lang
and ( subb.location_code <> subt.location_code
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 hr_locations_all_tl
(
location_id,
location_code,
description,
last_update_date,
last_updated_by,
last_update_login,
created_by,
creation_date,
language,
source_lang
)
select b.location_id,
b.location_code,
b.description,
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 hr_locations_all_tl b, fnd_languages l
where l.installed_flag in ('I', 'B')
and b.language = userenv('LANG')
and not exists
(select null
from hr_locations_all_tl t
where t.location_id = b.location_id
and t.language = l.language_code);
select business_group_id
from hr_locations_all
where location_id = p_location_id;