The following lines contain the word 'select', 'insert', 'update' or 'delete':
Select N.NOTIFICATION_ID
from WF_ITEM_ACTIVITY_STATUSES IAS, WF_NOTIFICATIONS N
where IAS.Item_Type = x_Item_Type
and IAS.Item_Key = x_Item_Key
and IAS.NOTIFICATION_ID = N.GROUP_ID
and N.status = 'OPEN'
and N.mail_status in ('MAIL', 'INVALID');
select
CWIAS.ITEM_TYPE,
CWIAS.ITEM_KEY,
CWIAS.PROCESS_ACTIVITY,
greatest((CWIAS.BEGIN_DATE - sysdate)*86400,0) delay
from WF_ITEM_ACTIVITY_STATUSES CWIAS, WF_PROCESS_ACTIVITIES CWPA,
WF_PROCESS_ACTIVITIES PWPA, WF_ITEM_ACTIVITY_STATUSES PWIAS
where CWIAS.ACTIVITY_STATUS = 'DEFERRED'
and CWIAS.PROCESS_ACTIVITY = CWPA.INSTANCE_ID
and CWPA.ACTIVITY_ITEM_TYPE = x_Item_Type
and CWIAS.ITEM_TYPE = x_Item_Type
and CWIAS.ITEM_KEY = x_Item_Key
and CWPA.PROCESS_NAME = PWPA.ACTIVITY_NAME
and CWPA.PROCESS_ITEM_TYPE = PWPA.ACTIVITY_ITEM_TYPE
and PWPA.INSTANCE_ID = PWIAS.PROCESS_ACTIVITY
and PWIAS.ITEM_TYPE = CWIAS.ITEM_TYPE
and PWIAS.ITEM_KEY = CWIAS.ITEM_KEY
and PWIAS.ACTIVITY_STATUS <> 'SUSPEND';
Select Item_Type, Item_Key
from wf_items
where Item_Type like l_item_type
and Item_Key like l_item_key
order by 1,2;