The following lines contain the word 'select', 'insert', 'update' or 'delete':
cursor tblcommentscur is select c.comment$
from sys.obj$ o, sys.user$ u, sys.com$ c
where o.name = upper_oldview and u.name = upper_owner
and o.obj# = c.obj# and o.owner#=u.user# and o.type# = 4
and c.col# is null;
cursor colcommentscur is select c.name, co.comment$, c.type#
from sys.obj$ o, sys.col$ c, sys.user$ u, sys.com$ co
where o.name = upper_oldview and u.name = upper_owner
and o.owner# = u.user# and o.type# = 4 and o.obj# = c.obj#
and c.obj# = co.obj# and c.intcol# = co.col#
and bitand(c.property, 32) = 0;
' CONTAINER_DATA AS SELECT * FROM CONTAINERS(' ||
quoted_owner || '.' || quoted_oldview || ')';
execute immediate 'SELECT USER# FROM USER$ WHERE TYPE# = 1 AND NAME = :1'
into ownerId using upper(owner);
execute immediate 'SELECT 1 FROM OBJ$ WHERE NAME = :1' ||
' AND TYPE# in (2, 4) and owner# = :2' ||
' AND REMOTEOWNER is null'
into cCheck using upper(oldview), ownerId;