The following lines contain the word 'select', 'insert', 'update' or 'delete':
select a.media_item_id, a.last_update_date, a.status, a.classification, a.attribute1, a.attribute2, b.start_date_time
from cct_media_items a, jtf_ih_media_items b
where a.media_type <> 1 and a.media_item_id = b.media_id and b.active = 'Y';
l_end_date_time := c1_rec.last_update_date;
select milcs_id, start_date_time from jtf_ih_media_item_lc_segs where active = 'Y'
and media_id = c1_rec.media_item_id;
JTF_IH_PUB_W.Update_MediaLifecycle
(p_api_version=>1.0
,p_init_msg_list=>FND_API.G_FALSE
,p_commit=>FND_API.G_TRUE
,p_resp_appl_id=>1 -- IN RESP APPL ID
,p_resp_id=>1 -- IN RESP ID
,p_user_id=>FND_GLOBAL.USER_ID -- IN USER ID
,p_login_id=>NULL -- IN LOGIN ID
,p10_a3=>l_milcs_duration -- IN duration
,p10_a4=>l_end_date_time -- IN end date time
,p10_a5=>c2_rec.milcs_id -- IN milcs id
,p10_a7=>c1_rec.media_item_id -- IN media id
,p10_a8=>CCT_IH_PUB.G_IH_CCT_HANDLER_ID -- IN handler id
,x_return_status=>l_return_status
,x_msg_count=>l_msg_count
,x_msg_data=>l_msg_data );
select count(*) into l_unclosed_wa_lc_segs from jtf_ih_media_item_lc_segs c
where c.end_date_time is null
and c.media_id = c1_rec.media_item_id
and c.milcs_type_id = CCT_IH_PUB.G_IH_LCS_TYPE_WITH_AGENT;
select count(*) into l_total_wa_lc_segs from jtf_ih_media_item_lc_segs c
where c.media_id = c1_rec.media_item_id
and c.milcs_type_id = CCT_IH_PUB.G_IH_LCS_TYPE_WITH_AGENT;
select max(c.end_date_time) into l_end_date_time from jtf_ih_media_item_lc_segs c
where c.media_id = c1_rec.media_item_id and c.milcs_type_id = CCT_IH_PUB.G_IH_LCS_TYPE_WITH_AGENT;
select max(c.start_date_time) into l_start_date_time from jtf_ih_media_item_lc_segs c
where c.media_id = c1_rec.media_item_id and c.milcs_type_id = CCT_IH_PUB.G_IH_LCS_TYPE_WITH_AGENT;
select max(c.start_date_time) into l_in_queue_start_date_time from jtf_ih_media_item_lc_segs c
where c.media_id = c1_rec.media_item_id and c.milcs_type_id = CCT_IH_PUB.G_IH_LCS_TYPE_IN_QUEUE;
delete from cct_media_items where media_item_id = c1_rec.media_item_id;
select media_id, start_date_time from jtf_ih_media_items where active = 'Y' and media_id in
(select media_item_id from cct_media_items where media_type <> 1 and status NOT IN (1,2))
and start_date_time <= (sysdate - (l_timeout_in_minutes/1440));
select max(c.end_date_time) into l_max_milcs_end_date_time from jtf_ih_media_item_lc_segs c
where c.media_id = c1_rec.media_id;
select max(c.start_date_time) into l_max_milcs_start_date_time from jtf_ih_media_item_lc_segs c
where c.media_id = c1_rec.media_id;
select classification, attribute1, attribute2 into l_classification, l_attribute1, l_attribute2 from cct_media_items where media_item_id = c1_rec.media_id;
select milcs_id, start_date_time from jtf_ih_media_item_lc_segs where active = 'Y'
and media_id = c1_rec.media_id;
JTF_IH_PUB_W.Update_MediaLifecycle
(p_api_version=>1.0
,p_init_msg_list=>FND_API.G_FALSE
,p_commit=>FND_API.G_TRUE
,p_resp_appl_id=>1 -- IN RESP APPL ID
,p_resp_id=>1 -- IN RESP ID
,p_user_id=>FND_GLOBAL.USER_ID -- IN USER ID
,p_login_id=>NULL -- IN LOGIN ID
,p10_a3=>l_milcs_duration -- IN duration
,p10_a4=>l_end_date_time -- IN end date time
,p10_a5=>c2_rec.milcs_id -- IN milcs id
,p10_a7=>c1_rec.media_id -- IN media id
,p10_a8=>CCT_IH_PUB.G_IH_CCT_HANDLER_ID -- IN handler id
,x_return_status=>l_return_status
,x_msg_count=>l_msg_count
,x_msg_data=>l_msg_data );
delete from cct_media_items where media_item_id = c1_rec.media_id;
delete from CCT_MEDIA_ITEMS where
media_type <> 1 and status NOT IN (1,2) and creation_date <= (sysdate - (l_timeout_in_minutes/1440)) ;