The following lines contain the word 'select', 'insert', 'update' or 'delete':
v_SQL := 'select oracle_username from fnd_oracle_userid@' || l_dblink ||
' where read_only_flag = :flag' ||
' and oracle_id = :or_id';
v_SQL := 'select domain_name ' ||
'from rg_database_links ' ||
'where name = :pd';
SELECT h.*
FROM gl_consolidation_history h,
gl_consolidation c
WHERE h.consolidation_id = c.consolidation_id
AND c.name = p_name
ORDER BY h.last_update_date DESC;
SELECT h.*
FROM gl_consolidation_history h,
gl_consolidation_sets c
WHERE h.consolidation_set_id = c.consolidation_set_id
AND c.name = p_name
ORDER BY h.last_update_date DESC;
v_InsertSQL VARCHAR2(10000);
v_SQL := 'select apps_username ' ||
'from rg_database_links ' ||
'where name = :pd';
v_SQL := 'select sum(round(entered_dr, 2)), sum(round(entered_cr, 2)) ' ||
'from ' || l_in_table_name;
v_SQL := 'select count(*) ' ||
'from ' || l_in_table_name;
v_SQL := 'select user_je_source_name from gl_je_sources ' ||
'WHERE je_source_name = :s_name';
v_SQL := 'select count(*) from '|| l_in_table_name ||
' where period_name = :pd_name' ||
' and request_id = :rq_id' ||
' and actual_flag = :flag' ||
' and user_je_source_name = :s_name';
v_SQL := 'select user_je_source_name from gl_je_sources ' ||
'WHERE je_source_name = :s_name';
v_InsertSQL := 'INSERT INTO ' || applSysSchema || '.' ||l_out_table_name ||'@' || dblink ||
' (status, ledger_id,accounting_date,' ||
' currency_code, date_created, created_by,' ||
' actual_flag, user_je_category_name, user_je_source_name,' ||
' currency_conversion_date, encumbrance_type_id,' ||
' budget_version_id, user_currency_conversion_type,' ||
' currency_conversion_rate, segment1, segment2,' ||
' segment3, segment4, segment5, segment6,' ||
' segment7, segment8, segment9, segment10,' ||
' segment11, segment12, segment13,' ||
' segment14, segment15, segment16,' ||
' segment17, segment18, segment19,' ||
' segment20, segment21, segment22,' ||
' segment23, segment24, segment25,' ||
' segment26, segment27, segment28,' ||
' segment29, segment30, entered_dr,' ||
' entered_cr, accounted_dr, accounted_cr,' ||
' transaction_date, reference1, reference2,' ||
' reference3, reference4, reference5,' ||
' reference6, reference7, reference8,' ||
' reference9, reference10, reference11,' ||
' reference12, reference13, reference14,' ||
' reference15, reference16, reference17,' ||
' reference18, reference19, reference20,' ||
' reference21, reference22, reference23,' ||
' reference24, reference25, reference26,' ||
' reference27, reference28, reference29,' ||
' reference30, je_batch_id, period_name,' ||
' je_header_id, je_line_num, chart_of_accounts_id,' ||
' functional_currency_code,' ||
' code_combination_id, date_created_in_gl,' ||
' warning_code, status_description,' ||
' stat_amount, group_id, request_id,' ||
' subledger_doc_sequence_id, subledger_doc_sequence_value,' ||
' attribute1, attribute2, attribute3,' ||
' attribute4, attribute5, attribute6,' ||
' attribute7, attribute8, attribute9,' ||
' attribute10, attribute11, attribute12,' ||
' attribute13, attribute14, attribute15,' ||
' attribute16, attribute17, attribute18,' ||
' attribute19, attribute20, context,' ||
' context2, invoice_date, tax_code,' ||
' invoice_identifier, invoice_amount,' ||
' context3, ussgl_transaction_code,' ||
' descr_flex_error_message, jgzz_recon_ref,' ||
' average_journal_flag, originating_bal_seg_value,' ||
' gl_sl_link_id, gl_sl_link_table,' ||
' reference_date, balancing_segment_value, management_segment_value)' ||
' SELECT' ||
' status, :l_target_ledger_id, accounting_date,' ||
' currency_code, date_created, created_by,' ||
' actual_flag, user_je_category_name, :l_user_je_source_name,' ||
' currency_conversion_date, encumbrance_type_id,' ||
' :l_target_budget_version_id, user_currency_conversion_type,' ||
' currency_conversion_rate, segment1, segment2,' ||
' segment3, segment4, segment5, segment6,' ||
' segment7, segment8, segment9, segment10,' ||
' segment11, segment12, segment13,' ||
' segment14, segment15, segment16,' ||
' segment17, segment18, segment19,' ||
' segment20, segment21, segment22,' ||
' segment23, segment24, segment25,' ||
' segment26, segment27, segment28,' ||
' segment29, segment30, entered_dr,' ||
' entered_cr, accounted_dr, accounted_cr,' ||
' transaction_date, reference1, reference2,' ||
' reference3, reference4, reference5,' ||
' reference6, reference7, reference8,' ||
' reference9, reference10, reference11,' ||
' reference12, reference13, reference14,' ||
' reference15, reference16, reference17,' ||
' reference18, reference19, reference20,' ||
' reference21, reference22, reference23,' ||
' reference24, reference25, reference26,' ||
' reference27, reference28, reference29,' ||
' reference30, je_batch_id, period_name,' ||
' je_header_id, je_line_num, chart_of_accounts_id,' ||
' functional_currency_code,' ||
' code_combination_id, date_created_in_gl,' ||
' warning_code, status_description,' ||
' stat_amount, group_id, request_id,' ||
' subledger_doc_sequence_id, subledger_doc_sequence_value,' ||
' attribute1, attribute2, attribute3,' ||
' attribute4, attribute5, attribute6,' ||
' attribute7, attribute8, attribute9,' ||
' attribute10, attribute11, attribute12,' ||
' attribute13, attribute14, attribute15,' ||
' attribute16, attribute17, attribute18,' ||
' attribute19, attribute20, context,' ||
' context2, invoice_date, tax_code,' ||
' invoice_identifier, invoice_amount,' ||
' context3, ussgl_transaction_code,' ||
' descr_flex_error_message, jgzz_recon_ref,' ||
' average_journal_flag, originating_bal_seg_value,' ||
' gl_sl_link_id, gl_sl_link_table,' ||
' reference_date, balancing_segment_value, management_segment_value' ||
' FROM ' ||l_in_table_name ||
' where period_name = :pd_name' ||
' and request_id = :rq_id' ||
' and actual_flag = :flag' ||
' and user_je_source_name = :je_source';
EXECUTE IMMEDIATE v_InsertSQL USING l_target_ledger_id, l_target_je_source,
l_target_budget_version_id,l_pd_name, l_request_id,
actual_flag, l_user_je_source_name;
v_PDSQL := 'select p.start_date, p.end_date, p.quarter_start_date, ' ||
'p.year_start_date from gl_periods' ||
' p, gl_ledgers b ' ||
'where p.period_set_name = b.period_set_name ' ||
'and p.period_type = b.accounted_period_type ' ||
'and b.ledger_id = :s ' ||
'and p.period_name = :pd';
v_ledgerSQL := 'select enable_average_balances_flag from gl_ledgers ' ||
'where ledger_id = :ledger_id';
v_ledgerSQL := 'select consolidation_ledger_flag from gl_ledgers ' ||
'where ledger_id = :ledger_id';
v_ledgerSQL := 'SELECT CURRENCY_CODE FROM GL_ledgers ' ||
'WHERE ledger_id = :ledger_id';
v_ledgerSQL := 'select chart_of_accounts_id from gl_ledgers ' ||
'where ledger_id = :ledger_id';
chart.DELETE;
v_SQL := 'SELECT s.SEGMENT_NUM, ' ||
's.APPLICATION_COLUMN_NAME, ' ||
's.DISPLAY_SIZE ' ||
'FROM FND_FLEX_VALUE_SETS vs, ' ||
'FND_ID_FLEX_SEGMENTS s ' ||
'WHERE vs.flex_value_set_id = s.flex_value_set_id ' ||
'AND s.ID_FLEX_NUM = :coa_id ' ||
'AND s.application_id = :app_id ' ||
'AND s.id_flex_code = :gl' ||
' order by segment_num';
remote_chart.DELETE;
v_SelectSQL varchar2(300);
v_SelectSQL2 varchar2(300);
v_SelectSQL3 varchar2(300);
SELECT name INTO t_ledger_name FROM gl_ledgers WHERE ledger_id = p_ledger;
v_SelectSQL := 'select count(*) from rg_database_links ' ||
'where name = :dblink';
EXECUTE IMMEDIATE v_SelectSQL INTO l_count USING dblink;
v_SQL := 'select group_id from gl_consolidation_history ' ||
'where consolidation_id = :cons_id ' ||
'and consolidation_run_id = :cons_run_id';
v_SelectSQL varchar2(500);
v_SelectSQL := 'select * from ' || applSysSchema ||'.gl_je_batches@' || dblink ||
' where name like ''%' || TO_CHAR(l_reqJI_id) || '%''';
OPEN v_ReturnCursor FOR v_SelectSQL;
v_SelectSQL := 'select name from ' || applSysSchema ||'.gl_je_batches@' || dblink ||
' WHERE je_batch_id = :b_id';
EXECUTE IMMEDIATE v_SelectSQL INTO l_batch_name USING l_batch_id;
v_SelectSQL varchar2(500);
SELECT gc.to_ledger_name
FROM gl_consolidation_v gc, gl_consolidation_history gch
WHERE gc.consolidation_id = gch.consolidation_id
AND gch.group_id = cp_source_group_id;
debug_message('Updates the gl_cons_interface_' || l_to_group_id || ' on target database',TRUE);
v_SelectSQL := 'select * from ' || applSysSchema || '.gl_je_batches@' || dblink ||
' where name like ''%' || TO_CHAR(l_reqJI_id) || '%''';
OPEN v_ReturnCursor FOR v_SelectSQL;
v_SQL2 := 'select name from ' || applSysSchema ||'.gl_je_batches@' || dblink ||
' WHERE je_batch_id = :b_id';