The following lines contain the word 'select', 'insert', 'update' or 'delete':
l_comp_dim_update_stmt long;
,p_msg_text => 'Step 2: Build Cost Object Update Statement'
);
l_comp_dim_update_stmt :=
' update '||p_target_table_name||' '||p_target_table_alias||
' set cost_object_id = ('||
p_source_table_query||
l_comp_dim_where_clause||
' )'||
' where currency_type_code = ''ENTERED'''||
' and cost_object_id is null'||
' and '||p_target_dsg_where_clause||
' and exists ('||
p_source_table_query||
l_comp_dim_where_clause||
' )';
,p_msg_text => 'Step 3: Execute Dynamic Update Statement'
);
execute immediate l_comp_dim_update_stmt
using p_source_table_query_param1
,p_source_table_query_param2
,p_source_table_query_param1
,p_source_table_query_param2;
execute immediate l_comp_dim_update_stmt
using p_source_table_query_param1
,p_source_table_query_param1;
execute immediate l_comp_dim_update_stmt
using p_source_table_query_param2
,p_source_table_query_param2;
execute immediate l_comp_dim_update_stmt;
l_comp_dim_update_stmt long;
,p_msg_text => 'Step 2: Build Activity Update Statement'
);
l_comp_dim_update_stmt :=
' update '||p_target_table_name||' '||p_target_table_alias||
' set activity_id = ('||
p_source_table_query||
l_comp_dim_where_clause||
' )'||
' where ledger_id = :b_ledger_id'||
' and currency_type_code = ''ENTERED'''||
' and activity_id is null'||
' and '||l_financial_elem_id_clause||
' and '||l_line_item_id_clause||
' and '||p_target_dsg_where_clause||
' and exists ('||
p_source_table_query||
l_comp_dim_where_clause||
' )';
,p_msg_text => 'Step 3: Execute Dynamic Update Statement'
);
execute immediate l_comp_dim_update_stmt
using p_source_table_query_param1
,p_source_table_query_param2
,p_ledger_id
,p_source_table_query_param1
,p_source_table_query_param2;
execute immediate l_comp_dim_update_stmt
using p_source_table_query_param1
,p_ledger_id
,p_source_table_query_param1;
execute immediate l_comp_dim_update_stmt
using p_source_table_query_param2
,p_ledger_id
,p_source_table_query_param2;
execute immediate l_comp_dim_update_stmt
using p_ledger_id;
' select '' and '||p_source_table_alias||'.''||reqs.column_name||'' = '||
p_target_table_alias||'.''||reqs.column_name'||
' from fem_column_requiremnt_b reqs'||
' ,fem_tab_columns_v cols'||
' where reqs.'||p_comp_dim_req_column||'_dim_requirement_code is not null'||
' and reqs.'||p_comp_dim_req_column||'_dim_component_flag = ''Y'''||
' and reqs.dimension_id is not null'||
' and cols.table_name = :b_target_table_name'||
' and cols.column_name = reqs.column_name';