The following lines contain the word 'select', 'insert', 'update' or 'delete':
'INSERT INTO gl_je_lines_recon ' ||
'(je_header_id,je_line_num,ledger_id,' ||
'jgzz_recon_status,jgzz_recon_date,' ||
'jgzz_recon_id,jgzz_recon_ref,' ||
'last_update_date,last_updated_by,' ||
'creation_date,created_by,last_update_login) ' ||
'SELECT /*+ ORDERED INDEX(c gl_code_combinations_u1) */ ' ||
'l.je_header_id,l.je_line_num,l.ledger_id, ' ||
'nvl(l.jgzz_recon_status_11i,' || '''' || 'U' || '''' || ')' ||
',l.jgzz_recon_date_11i, ' ||
'l.jgzz_recon_id_11i,l.jgzz_recon_ref_11i, ' ||
'sysdate, -2, sysdate, -2, 1 ' ||
'FROM gl_code_combinations c, gl_je_lines l ' ||
' WHERE c.code_combination_id between :start_id and :end_id ' ||
'AND c.code_combination_id = l.code_combination_id ' ||
'AND c.jgzz_recon_flag = ' || '''' || 'Y' || '''' ||
' AND NOT EXISTS ' ||
'(SELECT /*+ ORDERED INDEX(r gl_je_lines_recon_u1) */ 1 ' ||
'FROM gl_je_lines_recon r ' ||
'WHERE r.je_header_id = l.je_header_id ' ||
'AND r.je_line_num = l.je_line_num) ';
FUNCTION prepare_recon_update(x_start_id NUMBER DEFAULT NULL,
x_end_id NUMBER DEFAULT NULL)
RETURN NUMBER
IS
--
l_rows NUMBER := 0;
fn_name CONSTANT VARCHAR2(30) := 'PREPARE_RECON_UPDATE';
END prepare_recon_update;
AD_PARALLEL_UPDATES_PKG.delete_update_information(
ad_parallel_updates_pkg.ID_RANGE,
l_gl_schema,
g_table_name,
g_script_name);
UPDATE GL_SYSTEM_USAGES
SET reconciliation_upg_flag = 'Y',
last_update_date = sysdate,
last_updated_by = 1,
last_update_login = 0;
PROCEDURE update_gl_je_lines_recon_table(
x_errbuf OUT NOCOPY VARCHAR2,
x_retcode OUT NOCOPY VARCHAR2,
x_batch_size NUMBER,
x_worker_Id NUMBER,
x_num_workers NUMBER,
x_argument4 VARCHAR2) IS
fn_name CONSTANT VARCHAR2(30) := 'UPDATE_GL_JE_LINES_RECON_TABLE';
ad_parallel_updates_pkg.initialize_id_range(
ad_parallel_updates_pkg.ID_RANGE,
x_argument4,
g_table_name,
g_script_name,
g_id_column,
x_worker_id,
x_num_workers,
x_batch_size, 0);
ad_parallel_updates_pkg.get_id_range(
l_start_id,
l_end_id,
l_any_rows_to_process,
x_batch_size,
TRUE);
l_rows_processed := prepare_recon_update(l_start_id,l_end_id);
ad_parallel_updates_pkg.processed_id_range(
l_rows_processed,
l_end_id);
ad_parallel_updates_pkg.get_id_range(
l_start_id,
l_end_id,
l_any_rows_to_process,
x_batch_size,
FALSE);
END update_gl_je_lines_recon_table;