The following lines contain the word 'select', 'insert', 'update' or 'delete':
select metric_display_name into v_name
from fnd_oam_metval_vl
where metric_short_name=v_first_portion;
select meaning into v_threshold_oper
from fnd_lookups
where lookup_type = 'OAM_DASHBOARD_THRESHOLD_OPER'
and lookup_code = v_second_portion;
select metric_display_name into v_name
from fnd_oam_metval_vl
where metric_short_name=v_first_portion;
select meaning into v_value
from fnd_lookups
where lookup_type = 'OAM_DASHBOARD_METRIC_STATUS'
and lookup_code = v_second_portion;
select user_concurrent_queue_name into v_name
from fnd_concurrent_queues_vl
where to_char(application_id) = v_first_portion
and to_char(concurrent_queue_id) = v_second_portion;
select meaning into v_value
from fnd_lookups
where lookup_type = 'OAM_DASHBOARD_METRIC_STATUS'
and lookup_code = v_third_portion;
select user_id into v_userid
from fnd_user where upper(user_name) = upper(p_owner);
select 1 into v_x
from fnd_oam_svci_info
where application_id = p_application_id
and concurrent_queue_name = p_concurrent_queue_name;
-- update
update fnd_oam_svci_info
set alert_enabled_flag = p_alert_enabled_flag,
collection_enabled_flag = p_collection_enabled_flag,
threshold_value = p_threshold_value,
last_updated_by = v_userid,
last_update_date = sysdate,
last_update_login = 0
where application_id = p_application_id
and concurrent_queue_name = p_concurrent_queue_name;
insert into fnd_oam_svci_info (
application_id,
concurrent_queue_name,
alert_enabled_flag,
collection_enabled_flag,
threshold_value,
created_by,
creation_date,
last_updated_by,
last_update_date,
last_update_login)
values (
p_application_id,
p_concurrent_queue_name,
p_alert_enabled_flag,
p_collection_enabled_flag,
p_threshold_value,
v_userid,
sysdate,
v_userid,
sysdate,
0);
select round(nvl(p_seconds, 0)) into v_seconds from dual;
select meaning into v_status
from fnd_lookups
where lookup_type = p_lookup_type
and lookup_code = v_entity;