[Home] [Help]
The following lines contain the word 'select', 'insert', 'update' or 'delete':
select WI.ROOT_ACTIVITY, WI.ROOT_ACTIVITY_VERSION, WI.BEGIN_DATE,
WI.USER_KEY
into wf_item.c_root_activity, wf_item.c_root_activity_version,
wf_item.c_begin_date, wf_item.c_userkey
from WF_ITEMS WI
where WI.ITEM_TYPE = InitCache.itemtype
and WI.ITEM_KEY = InitCache.itemkey;
select text_default into onDemandFlag from wf_activity_attributes
where activity_item_type = c_itemtype
and activity_name = c_root_activity
and activity_version=c_root_activity_version
and name = '#ONDEMANDATTR';
update WF_ITEMS set
PARENT_ITEM_TYPE = Set_Item_Parent.parent_itemtype,
PARENT_ITEM_KEY = Set_Item_Parent.parent_itemkey,
PARENT_CONTEXT = Set_Item_Parent.parent_context
where ITEM_TYPE = Set_Item_Parent.itemtype
and ITEM_KEY = Set_Item_Parent.itemkey;
update WF_ITEM_ATTRIBUTE_VALUES
set NUMBER_VALUE = NUMBER_VALUE + 1
where NAME like '#CNT_%'
and NUMBER_VALUE is not null
and ITEM_TYPE = parent_itemType
and ITEM_KEY = parent_itemKey;
update WF_ITEMS WI set
OWNER_ROLE = SetItemOwner.owner
where WI.ITEM_TYPE = SetItemOwner.itemtype
and WI.ITEM_KEY = SetItemOwner.itemkey;
update WF_ITEMS WI set
USER_KEY = SetItemUserKey.userkey
where WI.ITEM_TYPE = SetItemUserKey.itemtype
and WI.ITEM_KEY = SetItemUserKey.itemkey;
select USER_KEY
into buf
from WF_ITEMS WI
where WI.ITEM_TYPE = GetItemUserKey.itemtype
and WI.ITEM_KEY = GetItemUserKey.itemkey;
select WIA.ITEM_TYPE, WIA.NAME, WIA.TYPE, WIA.SUBTYPE, WIA.FORMAT,
WIA.TEXT_DEFAULT, WIA.NUMBER_DEFAULT, WIA.DATE_DEFAULT
from WF_ITEM_ATTRIBUTES WIA
where WIA.ITEM_TYPE = itype;
insert into WF_ITEMS (
ITEM_TYPE,
ITEM_KEY,
ROOT_ACTIVITY,
ROOT_ACTIVITY_VERSION,
OWNER_ROLE,
PARENT_ITEM_TYPE,
PARENT_ITEM_KEY,
BEGIN_DATE,
END_DATE,
USER_KEY
) values (
itemtype,
itemkey,
wflow,
rootversion,
Create_Item.owner_role,
'',
'',
actdate,
to_date(NULL),
Create_item.user_key
);
select text_default into onDemandFlag from wf_activity_attributes
where activity_item_type = c_itemtype
and activity_name = c_root_activity
and activity_version=c_root_activity_version
and name = '#ONDEMANDATTR';
insert into WF_ITEM_ATTRIBUTE_VALUES (
ITEM_TYPE,
ITEM_KEY,
NAME,
TEXT_VALUE,
NUMBER_VALUE,
DATE_VALUE
) select
itemtype,
itemkey,
WIA.NAME,
WIA.TEXT_DEFAULT,
WIA.NUMBER_DEFAULT,
WIA.DATE_DEFAULT
from WF_ITEM_ATTRIBUTES WIA
where WIA.ITEM_TYPE = itemtype;
select '1'
from wf_items
where item_type = itemtype
and item_key = itemkey
for update nowait;
UPDATE wf_items
SET end_date = sysdate
WHERE item_type = p_itemType
AND item_key = p_itemKey
AND end_date is NULL
RETURNING parent_item_type, parent_item_key, parent_context
INTO l_parent_itemtype, l_parent_itemkey, l_parent_context;
SELECT TEXT_VALUE
bulk collect into attrNames
FROM WF_ITEM_ATTRIBUTE_VALUES
WHERE ITEM_TYPE = p_itemType
AND ITEM_KEY = p_itemKey
AND NAME like ('#LBL_%')
AND TEXT_VALUE is NOT null;
SELECT wiav.NAME
bulk collect into attrNames
FROM WF_ITEM_ATTRIBUTE_VALUES wiav
WHERE wiav.ITEM_TYPE = l_parent_itemType
AND wiav.ITEM_KEY = l_parent_itemKey
and wiav.NAME like ('#CNT_%')
AND NOT EXISTS (select null
from wf_item_attribute_values wiav2
where wiav2.item_type = p_itemType
and wiav2.item_key = p_itemKey
and wiav2.name = REPLACE(wiav.name,'#CNT_','#LBL_'));