The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT period_name,
period_num,
quarter_num,
period_year
FROM gl_period_statuses
WHERE set_of_books_id = p_set_of_books_id
AND period_name = p_period_cutoff
AND application_id = l_gl_application_id;
SELECT application_id
INTO l_gl_application_id
FROM fnd_application
WHERE application_short_name = 'SQLGL';
SELECT nvl(sum(entered_dr),0) - nvl(sum(entered_cr),0)
INTO l_budget_bal
FROM igc_cbc_je_lines JE
WHERE JE.actual_flag = 'B' -- 'B' for Budget
and JE.code_combination_id = p_dccid
and JE.period_year = p_period_yr
and JE.set_of_books_id = p_sob_id
and JE.status = 'P' --Permanent
and JE.period_num <= p_period_nm
and JE.budget_version_id = p_budget_ver;
SELECT nvl(sum(entered_dr),0) - nvl(sum(entered_cr),0)
INTO l_budget_bal
FROM igc_cbc_je_lines JE
WHERE JE.actual_flag = 'B' -- 'B' for Budget
and JE.code_combination_id = p_dccid
and JE.period_year = p_period_yr
and JE.set_of_books_id = p_sob_id
and JE.status = 'P' --Permanent
and JE.quarter_num = p_quarter_nm
and JE.period_num <= p_period_nm
and JE.budget_version_id = p_budget_ver;
SELECT nvl(sum(entered_dr),0) - nvl(sum(entered_cr),0)
INTO l_budget_bal
FROM igc_cbc_je_lines JE
WHERE JE.actual_flag = 'B' -- 'B' for Budget
and JE.code_combination_id = p_dccid
and JE.period_year = p_period_yr
and JE.set_of_books_id = p_sob_id
and JE.status = 'P' --Permanent status
and JE.period_num = p_period_nm
and JE.budget_version_id = p_budget_ver;
SELECT nvl(sum(entered_dr),0) - nvl(sum(entered_cr),0)
INTO l_commit_bal
FROM igc_cbc_je_lines JE
WHERE JE.actual_flag = 'E'
and JE.code_combination_id = p_dccid
and JE.period_year = p_period_yr
and JE.encumbrance_type_id = p_enc_type_id
and JE.set_of_books_id = p_sob_id
and JE.period_num = p_period_nm;
SELECT nvl(sum(entered_dr),0) - nvl(sum(entered_cr),0)
INTO l_commit_bal
FROM igc_cbc_je_lines JE
WHERE JE.actual_flag = 'E'
and JE.code_combination_id = p_dccid
and JE.period_year = p_period_yr
and JE.encumbrance_type_id = p_enc_type_id
and JE.set_of_books_id = p_sob_id
and JE.quarter_num = p_quarter_nm
and JE.period_num <= p_period_nm;
SELECT nvl(sum(entered_dr),0) - nvl(sum(entered_cr),0)
INTO l_commit_bal
FROM igc_cbc_je_lines JE
WHERE JE.actual_flag = 'E'
and JE.code_combination_id = p_dccid
and JE.period_year = p_period_yr
and JE.encumbrance_type_id = p_enc_type_id
and JE.set_of_books_id = p_sob_id
and JE.period_num <= p_period_nm;