The following lines contain the word 'select', 'insert', 'update' or 'delete':
Update WF_ITEMS
Set HA_MIGRATION_FLAG = NULL
where HA_MIGRATION_FLAG is not null;
Update WF_ITEMS
Set HA_MIGRATION_FLAG = 'Y'
where HA_MIGRATION_FLAG is null
and ITEM_TYPE = x_ITEM_TYPE
and ITEM_KEY = x_ITEM_KEY;
-- that are not locked....we may want to use two seperate selects
-- here: one using the feature for pre-fuzzy fast processing and then
-- the one we currently use for completeness during fuzzy time.
-- We aren't using a cursor fetch loop here as we are more
-- worried about not holding locks than about local efficiency
begin
select ITEM_TYPE, ITEM_KEY
into itype, ikey
from WF_ITEMS
where HA_MIGRATION_FLAG = 'Y'
and rownum <2
for update of HA_MIGRATION_FLAG;
update WF_ITEMS
Set HA_MIGRATION_FLAG = NULL
where ITEM_TYPE = itype
and ITEM_KEY = ikey;
select count(*)
into ekount
from wf_item_attribute_values
where ITEM_TYPE = itype
and ITEM_KEY = ikey
and EVENT_VALUE is not null;
myparams.DELETE;
select count(*)
into kount
from sys.user$ t
where t.name = WF_Schema;
/* insert dummy subscriber to make sure view works */
myagent := sys.aq$_agent('MyDummyAgent',NULL, NULL);
sql_stmt := sql_stmt || 'CURSOR C1 is select NAME, ADDRESS, PROTOCOL ';