The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT path_name
FROM JDR_PATHS
WHERE path_owner_docid = 2
CONNECT BY PRIOR PATH_OWNER_DOCID = PATH_DOCID
START WITH PATH_DOCID = docID;
SELECT x.DOCUMENT_ID,
x.DOCUMENT_NAME,
x.REGION_NAME,
x.REGION_TYPE,
x.APP_SHORT_NAME
BULK COLLECT INTO docId, docName, regionName, regionType, appName
FROM (
SELECT COMP.comp_docid AS document_id,
jdr_mds_internal.getdocumentname(COMP.comp_docid) AS document_name,
PATH.path_name AS region_name,
COMP.comp_element AS region_type,
FWK_PORTLET_GEN_UTIL.getPathName(COMP.comp_docid)AS app_short_name
FROM jdr_components COMP, jdr_attributes ATTR, jdr_paths PATH
WHERE COMP.comp_docid = ATTR.att_comp_docid
AND PATH.path_docid = COMP.comp_docid
AND ATTR.att_name = 'amDefName'
AND ATTR.att_value IS NOT NULL
AND ATTR.att_comp_seq = 0
AND COMP.comp_seq = 0
AND COMP.comp_element IN ('oa:advancedTable', 'oa:bulletedList',
'oa:defaultDoubleColumn', 'oa:defaultFormStack',
'oa:defaultSingleColumn', 'oa:defaultStack', 'oa:flowLayout',
'oa:footer', 'oa:gantt', 'oa:graphTable', 'oa:hgrid',
'oa:header', 'oa:hideShow', 'oa:hideShowHeader',
'labeledFieldLayout', 'oa:messageComponentLayout', 'oa:query',
'oa:shuttle', 'oa:stackLayout', 'oa:subTabLayout',
'oa:table', 'oa:tableLayout', 'oa:tree')
AND COMP.comp_docid
IN ( SELECT att_comp_docid FROM jdr_attributes
WHERE att_name = 'standalone'
AND att_value = 'true'
AND att_comp_seq = 0 )
UNION ALL
SELECT COMP.comp_docid AS document_id,
jdr_mds_internal.getdocumentname(COMP.comp_docid)||'.'||COMP.comp_id AS document_name,
COMP.comp_id AS region_name,
COMP.comp_element AS region_type ,
FWK_PORTLET_GEN_UTIL.getPathName(COMP.comp_docid)AS app_short_name
FROM jdr_components COMP, jdr_attributes ATTR
WHERE COMP.comp_docid = ATTR.att_comp_docid
AND ATTR.att_name = 'amDefName'
AND attr.att_value IS NOT NULL
AND ATTR.att_comp_seq = COMP.comp_seq
AND COMP.comp_seq <> 0
AND COMP.comp_element IN ('oa:advancedTable', 'oa:bulletedList',
'oa:defaultDoubleColumn', 'oa:defaultFormStack',
'oa:defaultSingleColumn', 'oa:defaultStack', 'oa:flowLayout',
'oa:footer', 'oa:gantt', 'oa:graphTable', 'oa:hgrid',
'oa:header', 'oa:hideShow', 'oa:hideShowHeader',
'labeledFieldLayout', 'oa:messageComponentLayout', 'oa:query',
'oa:shuttle', 'oa:stackLayout', 'oa:subTabLayout',
'oa:table', 'oa:tableLayout', 'oa:tree')
AND COMP.comp_docid
IN ( SELECT DISTINCT att_comp_docid FROM jdr_attributes
WHERE att_name = 'standalone'
AND att_value = 'true'
AND att_comp_seq = COMP.comp_seq )
UNION ALL
SELECT COMP.comp_docid AS document_id,
jdr_mds_internal.getdocumentname(COMP.comp_docid) AS document_name,
PATH.path_name AS region_name,
COMP.comp_element AS region_type,
FWK_PORTLET_GEN_UTIL.getPathName(COMP.comp_docid)AS app_short_name
FROM jdr_components COMP, jdr_paths PATH
WHERE COMP.comp_element = 'oa:contentContainer'
AND PATH.path_docid = COMP.comp_docid
AND COMP.COMP_SEQ = 0
UNION ALL
SELECT COMP.comp_docid AS document_id,
jdr_mds_internal.getdocumentname(COMP.comp_docid)||'.'||COMP.comp_id AS document_name,
COMP.comp_id AS region_name,
COMP.comp_element AS region_type,
FWK_PORTLET_GEN_UTIL.getPathName(COMP.comp_docid)AS app_short_name
FROM jdr_components COMP
WHERE COMP.comp_element = 'oa:contentContainer'
AND COMP.COMP_SEQ <> 0 )x;
INSERT INTO FWK_PORTLET_GEN(DOCUMENT_ID ,
DOCUMENT_NAME ,
REGION_NAME ,
REGION_TYPE ,
APP_SHORT_NAME)
VALUES( docId(i),
docName(i),
regionName(i),
regionType(i),
appName(i));