The following lines contain the word 'select', 'insert', 'update' or 'delete':
l_stmt:=l_stmt||' as select upper(ltc.name) name,ltc.elementid id,upper(lvl.LEVEL_PREFIX) prefix from ';
l_stmt:=l_stmt||' as select * from '||g_wh_dang_table||g_db_link_stmt||
' where 1=2';
l_stmt:=l_stmt||' as select distinct level_table,value';
l_stmt:=l_stmt||' as select distinct level_table,value';
l_stmt:=l_stmt||' as select * from '||l_table;
l_stmt:=l_stmt||' as select level_table,value';
l_stmt:=l_stmt||' from '||l_table2||' UNION select level_table,value';
l_stmt:=l_stmt||' as select * from '||l_table;
l_stmt:=l_stmt||' as select A.rowid row_id from '||l_table||' A,'||g_dang_table||' B '||
' where ';
l_stmt:=l_stmt||' as select rowid row_id from '||l_table||' MINUS select row_id from '||l_table2;
l_stmt:='insert into '||g_dang_table||'(';
l_stmt:=l_stmt||') select ';
write_to_log_file_n('Inserted '||sql%rowcount||' rows '||get_time);
l_stmt:='select name,id,prefix from '||g_level_table;
l_stmt:='select EDW_OWB_COLLECTION_UTIL.get_lowest_level_table'||g_db_link_stmt||'(null,'||g_object_id||
') from dual';
l_stmt:='select EDW_OWB_COLLECTION_UTIL.get_dim_pk'||g_db_link_stmt||'(null,'||g_object_id||
') from dual';
l_stmt:=l_stmt||' as select ';
l_stmt1:='insert ';
l_stmt1:=l_stmt1||') select ';
write_to_log_file_n('Inserted '||sql%rowcount||' rows '||get_time);
write_to_log_file_n('Inserted '||sql%rowcount||' rows '||get_time);
l_stmt:=l_stmt||' as select distinct '||l_level_pk||' from '||l_table;
l_stmt:=l_stmt||' as select value '||l_level_pk||' from '||g_dang_table||
' where level_table='||l_level_id(i);
l_stmt:=l_stmt||' as select '||l_level_pk||' from '||l_table2||' MINUS select '||
l_level_pk||' from '||l_table3;
l_stmt:='insert into '||g_dang_table||'(level_table,value) select '||l_level_id(i)||','||l_level_pk||
' from '||l_table4;
write_to_log_file_n('Inserted '||sql%rowcount||' rows '||get_time);
l_stmt:='select DIM_ID from edw_dimensions_md_v'||g_db_link_stmt||' where DIM_NAME=:a';
l_stmt:='select instance_code from edw_local_instance';
l_stmt:='select default_tablespace from dba_users where username=:a';
l_stmt:='select 1 from edw_attribute_sets_md_v'||g_db_link_stmt||' sis where '||
'sis.ATTRIBUTE_GROUP_NAME=''AUTO_DANGLING_RECOVERY'' '||
'and sis.ENTITY_ID=:b';
l_stmt:='select EDW_OPTION.get_source_option'||g_db_link_stmt||'(null,'||g_object_id||','''||
p_option_code||''','''||g_instance||''') from dual';
l_stmt:='select 1 from '||p_table||' where rownum=1';
l_stmt:='select 1 from '||p_owner||'.'||p_table||' where rownum=1';
l_stmt:='select column_name from all_tab_columns where table_name=:a and owner=:b order by column_id';
l_stmt:='select tab.column_name from all_tab_columns tab, user_synonyms syn where
tab.table_name=:a and tab.table_name=syn.table_name and tab.owner=syn.table_owner order by tab.column_id';
l_stmt:='select profile_option_name from fnd_profile_options where profile_option_name '||
' like '''||g_object_name||'_PS%''';
l_stmt:='select 1 from '||p_table||' where rownum=1';
l_stmt:='select 1 from '||p_table||' where '||p_where||' and rownum=1';
l_stmt:='create or replace view '||g_missing_key_view||' as select '''||g_object_name||''' dimension_name,'||
'A.name level_table,B.value value';