The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT *
FROM xla_appli_amb_contexts
WHERE application_id = p_application_id
AND amb_context_code = p_amb_context_code
FOR UPDATE OF application_id NOWAIT;
DELETE FROM xla_stage_acctg_methods
WHERE staging_amb_context_code = p_staging_context_code;
xla_aad_loader_util_pvt.insert_aadloaderlog(
p_amb_context_code => p_staging_context_code,
p_application_id => p_application_id,
p_request_code => 'IMPORT' ,
p_log_type_code => 'PRE-IMPORT',
p_encoded_message => '# delete xla_stage_acctg_methods = '||SQL%ROWCOUNT,
p_component_code => 'pre_import');
trace(p_msg => '# record deleted from xla_stage_acctg_methods = '||SQL%ROWCOUNT,
p_module => l_log_module,
p_level => C_LEVEL_STATEMENT);
DELETE FROM xla_staging_components_h
WHERE staging_amb_context_code = p_staging_context_code;
xla_aad_loader_util_pvt.insert_aadloaderlog(
p_amb_context_code => p_staging_context_code,
p_application_id => p_application_id,
p_request_code => 'IMPORT' ,
p_log_type_code => 'PRE-IMPORT',
p_encoded_message => '# delete xla_staging_components_h = '||SQL%ROWCOUNT,
p_component_code => 'pre_import');
trace(p_msg => '# record deleted from xla_staging_components_h = '||SQL%ROWCOUNT,
p_module => l_log_module,
p_level => C_LEVEL_STATEMENT);
DELETE FROM xla_conditions
WHERE amb_context_code = p_staging_context_code
AND segment_rule_detail_id IS NOT NULL;
xla_aad_loader_util_pvt.insert_aadloaderlog(
p_amb_context_code => p_staging_context_code,
p_application_id => p_application_id,
p_request_code => 'IMPORT' ,
p_log_type_code => 'PRE-IMPORT',
p_encoded_message => '# delete xla_conditions = '||SQL%ROWCOUNT,
p_component_code => 'pre_import');
trace(p_msg => '# record deleted from xla_conditions = '||SQL%ROWCOUNT,
p_module => l_log_module,
p_level => C_LEVEL_STATEMENT);
DELETE FROM xla_seg_rule_details
WHERE amb_context_code = p_staging_context_code;
xla_aad_loader_util_pvt.insert_aadloaderlog(
p_amb_context_code => p_staging_context_code,
p_application_id => p_application_id,
p_request_code => 'IMPORT' ,
p_log_type_code => 'PRE-IMPORT',
p_encoded_message => '# delete xla_seg_rule_details = '||SQL%ROWCOUNT,
p_component_code => 'pre_import');
trace(p_msg => '# record deleted from xla_seg_rule_details = '||SQL%ROWCOUNT,
p_module => l_log_module,
p_level => C_LEVEL_STATEMENT);
DELETE FROM xla_seg_rules_tl
WHERE amb_context_code = p_staging_context_code;
xla_aad_loader_util_pvt.insert_aadloaderlog(
p_amb_context_code => p_staging_context_code,
p_application_id => p_application_id,
p_request_code => 'IMPORT' ,
p_log_type_code => 'PRE-IMPORT',
p_encoded_message => '# delete xla_seg_rules_tl = '||SQL%ROWCOUNT,
p_component_code => 'pre_import');
trace(p_msg => '# record deleted from xla_seg_rules_tl = '||SQL%ROWCOUNT,
p_module => l_log_module,
p_level => C_LEVEL_STATEMENT);
DELETE FROM xla_seg_rules_b
WHERE amb_context_code = p_staging_context_code;
xla_aad_loader_util_pvt.insert_aadloaderlog(
p_amb_context_code => p_staging_context_code,
p_application_id => p_application_id,
p_request_code => 'IMPORT' ,
p_log_type_code => 'PRE-IMPORT',
p_encoded_message => '# delete xla_seg_rules_b = '||SQL%ROWCOUNT,
p_component_code => 'pre_import');
trace(p_msg => '# record deleted from xla_seg_rules_b = '||SQL%ROWCOUNT,
p_module => l_log_module,
p_level => C_LEVEL_STATEMENT);
DELETE FROM xla_mapping_set_values
WHERE amb_context_code = p_staging_context_code;
xla_aad_loader_util_pvt.insert_aadloaderlog(
p_amb_context_code => p_staging_context_code,
p_application_id => p_application_id,
p_request_code => 'IMPORT' ,
p_log_type_code => 'PRE-IMPORT',
p_encoded_message => '# delete xla_mapping_set_values = '||SQL%ROWCOUNT,
p_component_code => 'pre_import');
trace(p_msg => '# record deleted from xla_mapping_set_values = '||SQL%ROWCOUNT,
p_module => l_log_module,
p_level => C_LEVEL_STATEMENT);
DELETE FROM xla_mapping_sets_tl
WHERE amb_context_code = p_staging_context_code;
xla_aad_loader_util_pvt.insert_aadloaderlog(
p_amb_context_code => p_staging_context_code,
p_application_id => p_application_id,
p_request_code => 'IMPORT' ,
p_log_type_code => 'PRE-IMPORT',
p_encoded_message => '# delete xla_mapping_sets_tl = '||SQL%ROWCOUNT,
p_component_code => 'pre_import');
trace(p_msg => '# record deleted from xla_mapping_sets_tl = '||SQL%ROWCOUNT,
p_module => l_log_module,
p_level => C_LEVEL_STATEMENT);
DELETE FROM xla_mapping_sets_b
WHERE amb_context_code = p_staging_context_code;
xla_aad_loader_util_pvt.insert_aadloaderlog(
p_amb_context_code => p_staging_context_code,
p_application_id => p_application_id,
p_request_code => 'IMPORT' ,
p_log_type_code => 'PRE-IMPORT',
p_encoded_message => '# delete xla_mapping_sets_b = '||SQL%ROWCOUNT,
p_component_code => 'pre_import');
trace(p_msg => '# record deleted from xla_mapping_sets_b = '||SQL%ROWCOUNT,
p_module => l_log_module,
p_level => C_LEVEL_STATEMENT);
DELETE FROM xla_analytical_sources
WHERE amb_context_code = p_staging_context_code;
xla_aad_loader_util_pvt.insert_aadloaderlog(
p_amb_context_code => p_staging_context_code,
p_application_id => p_application_id,
p_request_code => 'IMPORT' ,
p_log_type_code => 'PRE-IMPORT',
p_encoded_message => '# delete xla_analytical_sources = '||SQL%ROWCOUNT,
p_component_code => 'pre_import');
trace(p_msg => '# record deleted from xla_analytical_sources = '||SQL%ROWCOUNT,
p_module => l_log_module,
p_level => C_LEVEL_STATEMENT);
DELETE FROM xla_analytical_dtls_tl
WHERE amb_context_code = p_staging_context_code;
xla_aad_loader_util_pvt.insert_aadloaderlog(
p_amb_context_code => p_staging_context_code,
p_application_id => p_application_id,
p_request_code => 'IMPORT' ,
p_log_type_code => 'PRE-IMPORT',
p_encoded_message => '# delete xla_analytical_dtls_tl = '||SQL%ROWCOUNT,
p_component_code => 'pre_import');
trace(p_msg => '# record deleted from xla_analytical_dtls_tl = '||SQL%ROWCOUNT,
p_module => l_log_module,
p_level => C_LEVEL_STATEMENT);
DELETE FROM xla_analytical_dtls_b
WHERE amb_context_code = p_staging_context_code;
xla_aad_loader_util_pvt.insert_aadloaderlog(
p_amb_context_code => p_staging_context_code,
p_application_id => p_application_id,
p_request_code => 'IMPORT' ,
p_log_type_code => 'PRE-IMPORT',
p_encoded_message => '# delete xla_analytical_dtls_b = '||SQL%ROWCOUNT,
p_component_code => 'pre_import');
trace(p_msg => '# record deleted from xla_analytical_dtls_b = '||SQL%ROWCOUNT,
p_module => l_log_module,
p_level => C_LEVEL_STATEMENT);
DELETE FROM xla_analytical_hdrs_tl
WHERE amb_context_code = p_staging_context_code;
xla_aad_loader_util_pvt.insert_aadloaderlog(
p_amb_context_code => p_staging_context_code,
p_application_id => p_application_id,
p_request_code => 'IMPORT' ,
p_log_type_code => 'PRE-IMPORT',
p_encoded_message => '# delete xla_analytical_hdrs_tl = '||SQL%ROWCOUNT,
p_component_code => 'pre_import');
trace(p_msg => '# record deleted from xla_analytical_hdrs_tl = '||SQL%ROWCOUNT,
p_module => l_log_module,
p_level => C_LEVEL_STATEMENT);
DELETE FROM xla_analytical_hdrs_b
WHERE amb_context_code = p_staging_context_code;
xla_aad_loader_util_pvt.insert_aadloaderlog(
p_amb_context_code => p_staging_context_code,
p_application_id => p_application_id,
p_request_code => 'IMPORT' ,
p_log_type_code => 'PRE-IMPORT',
p_encoded_message => '# delete xla_analytical_hdrs_b = '||SQL%ROWCOUNT,
p_component_code => 'pre_import');
trace(p_msg => '# record deleted from xla_analytical_hdrs_b = '||SQL%ROWCOUNT,
p_module => l_log_module,
p_level => C_LEVEL_STATEMENT);
INSERT INTO xla_aad_loader_logs
(aad_loader_log_id
,amb_context_code
,application_id
,request_code
,log_type_code
,aad_application_id
,product_rule_code
,product_rule_type_code
,version_to
,object_version_number
,creation_date
,created_by
,last_update_date
,last_updated_by
,last_update_login
,program_update_date
,program_application_id
,program_id
,request_id)
SELECT xla_aad_loader_logs_s.nextval
,p_amb_context_code
,p_application_id
,'IMPORT'
,'IMPORTED_AAD'
,application_id
,product_rule_code
,product_rule_type_code
,version_num
,1
,sysdate
,xla_environment_pkg.g_usr_id
,sysdate
,xla_environment_pkg.g_usr_id
,xla_environment_pkg.g_login_id
,sysdate
,xla_environment_pkg.g_prog_appl_id
,xla_environment_pkg.g_prog_id
,xla_environment_pkg.g_req_Id
FROM xla_product_rules_b
WHERE application_id = p_application_id
AND amb_context_code = p_staging_context_code;
trace(p_msg => '# rows inserted into xla_aad_loader_logs = '||SQL%ROWCOUNT,
p_module => l_log_module,
p_level => C_LEVEL_STATEMENT);
UPDATE xla_appli_amb_contexts
SET updated_flag = 'Y'
,creation_date = sysdate
,created_by = xla_environment_pkg.g_usr_id
,last_update_date = sysdate
,last_updated_by = xla_environment_pkg.g_usr_id
,last_update_login = xla_environment_pkg.g_login_id
WHERE amb_context_code = p_amb_context_code
AND application_id = p_application_id;