The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT warehouse_to_instance_link
FROM edw_source_instances_vl
WHERE enabled_flag = 'Y';
SELECT column_name
FROM all_tab_columns
WHERE table_name = 'EDW_SYSTEM_PARAMETERS'
AND owner=edw_owb_collection_util.get_db_user('BIS')
AND column_name NOT IN ('LAST_UPDATE_DATE', 'CREATION_DATE'); --removed Upper for bug#4905343
SELECT instance_code, warehouse_to_instance_link
FROM edw_source_instances_vl
WHERE enabled_flag = 'Y';
dbms_sql.parse(cid, 'SELECT 1 FROM dual@'||p_db_link, dbms_sql.native);
DBMS_SQL.PARSE(cid, 'SELECT sysdate FROM dual@'||l_db_link, dbms_sql.native);
l_stmt:='SELECT distinct column_name
FROM all_tab_columns@' ||l_db_link ||
' WHERE table_name = ''EDW_LOCAL_SYSTEM_PARAMETERS''
AND upper(column_name) not in ( ''LAST_UPDATE_DATE'',''CREATION_DATE'')' ||
' INTERSECT SELECT distinct column_name from all_tab_columns '||
' WHERE table_name = ''EDW_SYSTEM_PARAMETERS''
AND upper(column_name) not in ( ''LAST_UPDATE_DATE'',''CREATION_DATE'')' ;
l_stmt:= 'SELECT distinct tab.column_name FROM all_tab_columns@'
||l_db_link || ' tab ,user_synonyms@' ||l_db_link ||
' syn WHERE tab.table_name = ''EDW_LOCAL_SYSTEM_PARAMETERS''' ||
' and syn.table_name = tab.table_name and tab.owner=syn.table_owner ' ||
' AND upper(tab.column_name) not in ( ''LAST_UPDATE_DATE'',''CREATION_DATE'')' ||
' INTERSECT SELECT distinct tab.column_name from all_tab_columns tab ,'||
' user_synonyms syn WHERE tab.table_name = ''EDW_LOCAL_SYSTEM_PARAMETERS'''||
' and syn.table_name =tab.table_name and tab.owner=syn.table_owner '||
'AND upper(tab.column_name) not in ( ''LAST_UPDATE_DATE'',''CREATION_DATE'')';
-- First delete existing date from the source db
cid := DBMS_SQL.open_cursor;
DBMS_SQL.PARSE(cid, 'DELETE EDW_LOCAL_SYSTEM_PARAMETERS@'||l_db_link, dbms_sql.native);
l_stmt := 'INSERT INTO EDW_LOCAL_SYSTEM_PARAMETERS@'||l_db_link||' ( last_update_date, creation_date, ';
l_stmt := l_stmt ||l_colList||') SELECT :x1, :x1, '||l_colList||' FROM EDW_SYSTEM_PARAMETERS';
-- Now we can insert into these tables
l_progress := '060';
l_stmt:='select count(*) from fnd_id_flex_segments@'||l_db_link ||
' where application_id=''401'' '||
' and id_flex_code= ''MCAT'' '||
' and enabled_flag=''Y'' '||
' and id_flex_num= ' ||
' ( select structure_id '||
' from mtl_category_sets_b@'|| l_db_link ||
' where category_set_id=''1000000006'' )';
l_stmt:='select ''YES'' VBH_INSTALLED from mtl_category_sets_b@'||l_db_link ||
' where category_set_id = ''1000000006'' ';
l_stmt := 'SELECT ENI_EDW_UTILS.IS_CHILD_ORG_SUPPORTED FROM DUAL@' ||l_db_link;