The following lines contain the word 'select', 'insert', 'update' or 'delete':
select email_account_id, account_name, email_user, domain bulk collect into l_account_id_tbl, l_account_name_tbl, l_email_user_tbl, l_domain_tbl from iem_email_accounts
where upper(email_user)<>upper('intent') and upper(email_user)<>upper('acknowledgements') order by upper(email_user) ||'@'||upper(domain) asc;
ROLLBACK TO update_item_PVT;
ROLLBACK TO update_item_PVT;
ROLLBACK TO update_item_PVT;
cursor c1 is select distinct resource_id from iem_rt_proc_emails
where resource_id>0;
cursor c_new is select ih_media_item_id from iem_rt_proc_emails
where resource_id=l_agent_id and mail_item_status in ('A','N','T');
cursor c_read is select ih_media_item_id from iem_rt_proc_emails
where resource_id=l_agent_id and mail_item_status in ('R','S');
SAVEPOINT select_mail_count_pvt;
select max(start_date_time) into l_time
from jtf_ih_media_item_lc_segs
where media_id=v2.ih_media_item_id;
select max(start_date_time) into l_time
from jtf_ih_media_item_lc_segs
where media_id=v3.ih_media_item_id;
select max(start_date_time) into l_time
from jtf_ih_media_item_lc_segs
where media_id=v2.ih_media_item_id;
select max(start_date_time) into l_time
from jtf_ih_media_item_lc_segs
where media_id=v3.ih_media_item_id;
ROLLBACK TO select_mail_count_PVT;
ROLLBACK TO select_mail_count_PVT;
ROLLBACK TO select_mail_count_PVT;
cursor c1 is select distinct resource_id from iem_rt_proc_emails
where resource_id>0;
SAVEPOINT select_mail_count_pvt;
SELECT count(*)
into l_new_count_1
FROM iem_rt_proc_emails a
WHERE resource_id=v1.resource_id
and a.ih_media_item_id in
(select media_id from jtf_ih_media_item_lc_segs
WHERE milcs_type_id in (select * from TABLE(cast(i_tbl as jtf_number_table)))
AND resource_id=v1.resource_id and (sysdate-start_date_time)*24>=p_duration);
SELECT count(*)
into l_new_count_1
FROM iem_rt_proc_emails
WHERE resource_id=p_resource_id
and ih_media_item_id in
(select distinct media_id from jtf_ih_media_item_lc_segs
where milcs_type_id in (select * from TABLE(cast(i_tbl as jtf_number_table)))
and resource_id=p_resource_id and (sysdate-start_date_time)*24>=p_duration);
ROLLBACK TO select_mail_count_PVT;
ROLLBACK TO select_mail_count_PVT;
ROLLBACK TO select_mail_count_PVT;