The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT fifs.concatenated_segment_delimiter,
gcc.segment1,
gcc.segment2,
gcc.segment3,
gcc.segment4,
gcc.segment5,
gcc.segment6,
gcc.segment7,
gcc.segment8,
gcc.segment9,
gcc.segment10,
gcc.segment11,
gcc.segment12,
gcc.segment13,
gcc.segment14,
gcc.segment15,
gcc.segment16,
gcc.segment17,
gcc.segment18,
gcc.segment19,
gcc.segment20,
gcc.segment21,
gcc.segment22,
gcc.segment23,
gcc.segment24,
gcc.segment25,
gcc.segment26,
gcc.segment27,
gcc.segment28,
gcc.segment29,
gcc.segment30
FROM fnd_id_flex_structures fifs,
gl_code_combinations gcc
WHERE fifs.application_id=101
AND fifs.id_flex_code = 'GL#'
AND fifs.id_flex_num = gcc.chart_of_accounts_id
AND gcc.code_combination_id = p_ccid;
SELECT count(1) into l_nseg
FROM fnd_id_flex_segments fifs,
gl_code_combinations glcc
WHERE fifs.application_id = 101 and
fifs.id_flex_code = 'GL#' and
fifs.id_flex_num = glcc.chart_of_accounts_id and
glcc.code_combination_id =p_ccid;
SELECT ledger_id INTO l_return_id
FROM gl_ledger_le_v ledger_le, xle_firstparty_information_v le
WHERE fun_tca_pkg.get_le_id(p_party_id) = le.party_id
AND le.legal_entity_id = ledger_le.legal_entity_id
AND ledger_le.ledger_category_code = 'PRIMARY';
SELECT ccid INTO l_cc_id
FROM fun_inter_accounts
WHERE from_le_id = p_from_le_id
AND to_le_id = p_to_le_id
AND type = p_type
AND rownum = 1
ORDER by default_flag;
SELECT ccid INTO l_cc_id
FROM fun_inter_accounts
WHERE from_le_id = p_from_le_id
AND to_le_id = -99
AND type = p_type
AND rownum = 1
ORDER by default_flag;
select tgl.chart_of_accounts_id,
fun_bal_pkg.get_segment_index(tgl.chart_of_accounts_id,
'GL_BALANCING'),
fun_bal_pkg.get_segment_index(tgl.chart_of_accounts_id,
'GL_INTERCOMPANY')
into l_coa, l_bal_seg_num, l_ic_seg_num
from gl_ledgers fgl, gl_ledgers tgl
where fgl.chart_of_accounts_id = tgl.chart_of_accounts_id
and fgl.ledger_id = p_from_ledger_id
and tgl.ledger_id = p_to_ledger_id;
l_query := 'select SEGMENT'||l_bal_seg_num ||', DECODE('||l_ic_seg_num||', NULL, NULL, SEGMENT' || l_ic_seg_num ||') FROM GL_CODE_COMBINATIONS WHERE CODE_COMBINATION_ID = :ccid';
select CHART_OF_ACCOUNTS_ID
INTO l_coa
from gl_code_combinations
where code_combination_id = p_ccid;