The following lines contain the word 'select', 'insert', 'update' or 'delete':
l_select_csr INTEGER;
select a.tag_id, a.tag_type_code, a.value
from iem_tag_keys a, iem_account_tag_keys b
where a.tag_key_id = b.tag_key_id and b.email_account_id = p_account_id;
l_select_csr := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(l_select_csr, l_temp_value, DBMS_SQL.native);
DBMS_SQL.DEFINE_COLUMN(l_select_csr, 1, l_query_result, 256);
l_dummy := DBMS_SQL.EXECUTE(l_select_csr);
IF DBMS_SQL.FETCH_ROWS(l_select_csr) = 0 THEN
l_temp := null;
DBMS_SQL.COLUMN_VALUE(l_select_csr, 1, l_query_result);
IF DBMS_SQL.FETCH_ROWS(l_select_csr) <> 0 THEN
if l_log_enabled then
logMessage := '[ERROR (too many rows selected) when execute query for keyId: '||v_tags.tag_id ||']';
DBMS_SQL.CLOSE_CURSOR(l_select_csr);
DBMS_SQL.CLOSE_CURSOR(l_select_csr);
IEM_ENCRYPT_TAGS_PVT.update_item_on_mess_id (
p_api_version_number => P_Api_Version_Number,
p_init_msg_list => FND_API.G_FALSE,
p_commit => P_Commit,
p_encrypted_id => p_encrypted_id,
p_message_id => p_message_id,
x_return_status => l_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data
);
select
a.key,
a.value
from
iem_encrypted_tag_dtls a
where
a.encrypted_id = p_encrypted_id;
select token into l_token_out from iem_encrypted_tags where encrypted_id = l_encrypt_num;
select message_id into l_mess_id from iem_encrypted_tags where encrypted_id = l_encrypt_num;
SELECT agent_id, interaction_id
INTO l_agent_id, l_interaction_id
FROM iem_encrypted_tags
WHERE encrypted_id = l_encrypt_num;
select
a.key,
a.value
from
iem_encrypted_tag_dtls a, iem_encrypted_tags b
where
a.encrypted_id=b.encrypted_id and b.message_id = p_msg_id;
SELECT agent_id, interaction_id, encrypted_id, token
INTO l_agent_id, l_interaction_id, l_encrypted_id, l_token
FROM iem_encrypted_tags
WHERE message_Id = p_message_id;
select count(*) into l_asso_count from iem_agents where resource_id=p_agent_id and email_account_id=p_email_acct_id;
select count(*) into l_role_count from jtf_rs_role_relations a, jtf_rs_roles_vl b
where a.role_resource_id=p_agent_id and a.role_id=b.role_id
and b.role_type_code='ICENTER'
and a.delete_flag='N'
and a.START_DATE_ACTIVE< sysdate and ( a.END_DATE_ACTIVE>sysdate or a.END_DATE_ACTIVE is null);
select count(*) into l_grp_count from jtf_rs_group_members a, JTF_RS_GROUPS_B b, JTF_RS_GROUP_USAGES c
where a.group_id = b.group_id
and a.resource_id = p_agent_id
and a.delete_flag = 'N'
and b.START_DATE_ACTIVE< sysdate
and ( b.END_DATE_ACTIVE>sysdate or b.END_DATE_ACTIVE is null)
and b.group_id = c.group_id
and c.usage = 'CALL';
select count(a.user_id) into l_user_resp from jtf_rs_resource_extns a ,
fnd_user_resp_groups b, fnd_user c, fnd_responsibility resp
where a.resource_id = p_agent_id
and a.START_DATE_ACTIVE< sysdate and ( a.END_DATE_ACTIVE>sysdate or a.END_DATE_ACTIVE is null)
and a.user_id=b.user_id
and b.START_DATE< sysdate and ( b.END_DATE>sysdate or b.END_DATE is null)
-- and ( b.responsibility_id = 23720 or b.responsibility_id = 23107 )
and ( b.responsibility_id = resp.responsibility_id and resp.application_id=680)
and ( resp.responsibility_key = 'EMAIL_CENTER_SUPERVISOR' or resp.responsibility_key='IEM_SA_AGENT')
and b.user_id = c.user_id
and c.START_DATE< sysdate and ( c.END_DATE>sysdate or c.END_DATE is null);