The following lines contain the word 'select', 'insert', 'update' or 'delete':
select count(*)
into up
from Fnd_Concurrent_CRM_Requests
where request_id = reqid;
insert_error exception;
begin -- select block
select cd_id
into cdid
from fnd_conflicts_domain
where cd_name = cdname;
begin -- insert block
select fnd_conflicts_domain_s.nextval
into cdid
from sys.dual;
insert
into fnd_conflicts_domain (
cd_id,
cd_name,
user_cd_name,
runalone_flag,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login,
dynamic)
values (
cdid,
cdname,
cdname,
'N',
sysdate,
user_id,
sysdate,
user_id,
login_id,
'Y');
raise insert_error;
when insert_error then
fnd_message.set_name ('FND', 'SQL-Generic error');
'SUBMIT: conflicts_domain_insert_error', FALSE);
select cd_id
into cdid
from fnd_conflicts_domain
where cd_name = cdname;
end; -- insert block
end; -- select block
delete from fnd_conflicts_domain fcd
where dynamic = 'Y'
and not exists (select 'X'
from fnd_concurrent_requests fcr
where fcr.cd_id = fcd.cd_id
and phase_code in ('P', 'R'));