The following lines contain the word 'select', 'insert', 'update' or 'delete':
select count(*) INTO countEx
from ZPB_EXCP_RESULTS
where TASK_ID = TaskID;
select value into ExplainReq
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and NAME = 'EXPLANATION_REQUIRED_FLAG';
select NAME, VALUE
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and NAME <> 'SPECIFIED_TARGET_NAME';
elsif taskParamName = 'SAVED_SELECTION_NAME' then
value := v_tskparams.value;
FND_MESSAGE.SET_NAME ('ZPB', 'ZPB_NTF_SELECT_LABEL');
aname => 'EXCEPSELECTION',
avalue => value);
select value into l_authorIDT
from zpb_task_parameters
where task_id = TaskID and name = 'OWNER_ID';
select NAME, value
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and name = 'SPECIFIED_NOTIFICATION_RECIPIENT';
select TASK_NAME into TaskName
from zpb_analysis_cycle_tasks
where ANALYSIS_CYCLE_ID = InstanceID and task_id = taskid;
select value into l_authorIDT
from zpb_task_parameters
where task_id = TaskID and name = 'OWNER_ID';
select VALUE
into ExcType
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and name = 'EXCEPTION_TYPE';
select TASK_NAME
into TaskName
from zpb_analysis_cycle_tasks
where ANALYSIS_CYCLE_ID = InstanceID and task_id = taskid;
select INSTANCE_DESCRIPTION
into InstanceDesc
from ZPB_ANALYSIS_CYCLE_INSTANCES
where INSTANCE_AC_ID = InstanceID;
select NAME, VALUE
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and ( NAME = 'WAIT_TYPE' or NAME = 'WAIT_VALUE' );
select value into l_authorIDT
from zpb_task_parameters
where task_id = TaskID and name = 'OWNER_ID';
select value into ntfType
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and NAME = 'EXPLANATION_REQUIRED_FLAG';
select value into ntfTarget
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and NAME = 'NOTIFICATION_RECIPIENT_TYPE';
select value into ExcType
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and NAME = 'EXCEPTION_TYPE';
select *
from ZPB_EXCP_RESULTS
where TASK_ID = TaskID;
select value into l_dimname from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and NAME = 'EXCEPTION_DIMENSION_NAME';
select distinct OWNER
from ZPB_EXCP_RESULTS
where TASK_ID = TaskID
order by OWNER;
select *
from ZPB_EXCP_RESULTS
where TASK_ID = TaskID and OWNER = role;
select distinct OWNER_ID, OWNER, APPROVER_ID, APPROVER
from ZPB_EXCP_RESULTS
where TASK_ID = TaskID
order by OWNER;
select ITEM_KEY
from WF_ITEMS_V
where PARENT_ITEM_KEY = ParentItemKey;
select TASK_NAME
into TaskName
from zpb_analysis_cycle_tasks
where ANALYSIS_CYCLE_ID = InstanceID and task_id = taskid;
select INSTANCE_DESCRIPTION
into InstanceDesc
from ZPB_ANALYSIS_CYCLE_INSTANCES
where INSTANCE_AC_ID = InstanceID;
select distinct display_name
into NewDispName
from wf_users
where name = thisOwner;
select distinct display_name
into NewDispName
from wf_users
where name = thisApprover;
select *
from ZPB_EXCP_RESULTS
where TASK_ID = TaskID and OWNER = DataOwner;
select value into l_dimname
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and NAME = 'EXCEPTION_DIMENSION_NAME';
select distinct display_name
into UserDispName
from wf_roles
where name = thisRole;
select ITEM_KEY
from WF_ITEMS_V
where PARENT_ITEM_KEY = ParentItemKey;
select value
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and name = 'SPECIFIED_NOTIFICATION_RECIPIENT';
select TASK_NAME, LAST_UPDATED_BY
into TaskName, thisApproverID
from zpb_analysis_cycle_tasks
where ANALYSIS_CYCLE_ID = InstanceID and task_id = taskid;
select INSTANCE_DESCRIPTION
into InstanceDesc
from ZPB_ANALYSIS_CYCLE_INSTANCES
where INSTANCE_AC_ID = InstanceID;
select value
into ApproverTYPE
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and name = 'EXPLANATION_APPROVER';
select distinct display_name
into NewDispName
from wf_users
where name = thisRecipient;
select distinct display_name
into NewDispName
from wf_users
where name = thisApprover;
select NAME, value
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID;
select count(*) into thisCount
from WF_ITEM_ACTIVITY_STATUSES
where ITEM_TYPE = 'EPBCYCLE' and
ITEM_KEY in (select ITEM_KEY from WF_ITEMS_V where PARENT_ITEM_KEY = ItemKey)
and (ACTIVITY_STATUS = 'NOTIFIED' or ACTIVITY_RESULT_CODE = '#TIMEOUT');
select INSTANCE_DESCRIPTION
into InstDesc
from ZPB_ANALYSIS_CYCLE_INSTANCES
where INSTANCE_AC_ID = InstanceID;
elsif taskParamName = 'SAVED_SELECTION_NAME' then
value := v_tparams.value;
FND_MESSAGE.SET_NAME ('ZPB', 'ZPB_NTF_SELECT_LABEL');
aname => 'EXCEPSELECTION',
avalue => value);
SELECT ITEM_KEY, ASSIGNED_USER
FROM WF_ITEM_ACTIVITY_STATUSES
WHERE ITEM_TYPE = 'EPBCYCLE' and
ITEM_KEY in (select ITEM_KEY from WF_ITEMS_V where PARENT_ITEM_KEY = ItemKey)
and (ACTIVITY_STATUS = 'NOTIFIED' or ACTIVITY_RESULT_CODE = '#TIMEOUT');
select activity_id into l_activity_id
from WF_ITEM_ACTIVITY_STATUSES_V
WHERE ITEM_TYPE = 'EPBCYCLE'
AND ITEM_KEY = childItemKey
AND activity_name = 'EXPREQNTF';
select activity_id into l_activity_id
from WF_ITEM_ACTIVITY_STATUSES_V
WHERE ITEM_TYPE = 'EPBCYCLE'
AND ITEM_KEY = childItemKey
and activity_name = 'EXPAPPROVAL';
select distinct OWNER, OWNER_ID, APPROVER, APPROVER_ID
from ZPB_EXCP_EXPLANATIONS
where TASK_ID = TaskID and Notification_id = NID and STATUS = 2
order by OWNER;
select ITEM_KEY into ItemKey
from WF_ITEM_ACTIVITY_STATUSES_V
where item_type = 'EPBCYCLE' and NOTIFICATION_ID = NID;
aname => 'EXCEPSELECTION');
select distinct display_name
into NewDispName
from wf_users
where name = thisOwner;
select distinct display_name
into NewDispName
from wf_users
where name = thisApprover;
aname => 'EXCEPSELECTION',
avalue => ExcepSel);
select *
from ZPB_EXCP_EXPLANATIONS
where TASK_ID = TaskID and
NOTIFICATION_ID = nid and
OWNER = DataOwner and
status = 2;
select value into l_dimname
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and NAME = 'EXCEPTION_DIMENSION_NAME';
select distinct OWNER_ID, OWNER
from ZPB_EXCP_RESULTS
where TASK_ID = TaskID
order by OWNER;
select ITEM_KEY
from WF_ITEMS_V
where PARENT_ITEM_KEY = ParentItemKey;
select TASK_NAME into TaskName
from zpb_analysis_cycle_tasks
where ANALYSIS_CYCLE_ID = InstanceID and task_id = taskid;
select value into l_authorIDT
from zpb_task_parameters
where task_id = TaskID and name = 'OWNER_ID';
select INSTANCE_DESCRIPTION
into InstanceDesc
from ZPB_ANALYSIS_CYCLE_INSTANCES
where INSTANCE_AC_ID = InstanceID;
select VALUE
into ExcType
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and name = 'EXCEPTION_TYPE';
select distinct display_name
into NewDispName
from wf_users
where name = thisOwner;
select ITEM_KEY
from WF_ITEMS_V
where PARENT_ITEM_KEY = ParentItemKey;
select TASK_NAME, LAST_UPDATED_BY
into TaskName, thisApproverID
from zpb_analysis_cycle_tasks
where ANALYSIS_CYCLE_ID = InstanceID and task_id = taskid;
select INSTANCE_DESCRIPTION
into InstanceDesc
from ZPB_ANALYSIS_CYCLE_INSTANCES
where INSTANCE_AC_ID = InstanceID;
select value
into ApproverTYPE
from ZPB_TASK_PARAMETERS
where TASK_ID = TaskID and name = 'EXPLANATION_APPROVER';
select distinct display_name
into NewDispName
from wf_users
where name = thisRecipient;
select distinct display_name
into NewDispName
from wf_users
where name = thisApprover;