The following lines contain the word 'select', 'insert', 'update' or 'delete':
select fnd_events_s.nextval
into g_event_id
from sys.dual;
insert_error exception;
select USERENV('SESSIONID')
into g_audsid
from sys.dual;
select MACHINE
into g_node
from v$session
where audsid = g_audsid;
select module
into g_module
from v$session
where audsid = g_audsid;
insert into fnd_events
(event_id, source_application_id, source_id,
source_type, dest_type, message_appl_short_name,
message_name, module, user_id, resp_appl_id,
responsibility_id, security_group_id, session_id, node,
db_instance, audsid, time,
severity, processed, tokens)
values
(g_event_id, g_source_appl_id, g_source_id,
g_source_type, g_dest_type, g_message_appl,
g_message_name, g_module, g_user_id, g_resp_appl_id,
g_responsibility_id, g_security_group_id, g_session_id,
g_node, g_db_instance, g_audsid, sysdate,
g_severity, 'N', has_tokens);
raise insert_error;
insert into fnd_event_tokens
(event_id, token,
type, value)
values
( post.event_id, p_token_name,
p_token_translate, p_token_value);
raise insert_error;
when insert_error then
fnd_message.set_name ('FND', 'SQL-Generic error');
'ROUTINE', 'FND_EVENT.post: insert_error', FALSE);
update fnd_events
set processed = upper(flag)
where event_id = set_processed.event_id;
select /*+ index(FND_EVENTS) */ event_id, message_name, tokens
from fnd_events
where source_id = p_source_id
and source_type = p_source_type
order by event_id;
select token, type, value
from fnd_event_tokens
where event_id = p_event_id;
select USERENV('SESSIONID')
into l_source_id
from sys.dual;
select event_id
from fnd_events
where processed = 'N';
select token, type, value
from fnd_event_tokens
where event_id = instance_id;
select message_appl_short_name, message_name,
time, severity, tokens
into msg_appl_sn, msg_name, t, sev, token_flag
from fnd_events
where event_id = inst_id
and processed = 'N'
for update of processed nowait;
update fnd_events
set processed = 'Y'
where event_id = inst_id;
select token, type, value
from fnd_event_tokens
where event_id = instance_id;
select message_appl_short_name, message_name, tokens
into msg_appl_sn, msg_name, token_flag
from fnd_events
where event_id = oem_get_text.event_id;