The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT pelh.enc_element_type_id , sum(decode(pelh.gl_project_flag , 'G',
encumbrance_amount , 0))gl_enc_amount, sum(decode(pelh.gl_project_flag, 'P',
encumbrance_amount, 0))gms_enc_amount
from psp_enc_summary_lines pesl,
psp_enc_lines_history pelh
WHERE
pelh.assignment_id=p_assignment_id and
pesl.enc_summary_line_id=pelh.enc_summary_line_id
and pesl.effective_date between p_encumbrance_start_date and
p_encumbrance_end_date
and pesl.status_code='A'
group by pelh.enc_element_type_id ;
p_encumbrance_table.r_gl_enc_amount.delete;
p_encumbrance_table.r_gms_enc_amount.delete;
p_encumbrance_table.r_element_type_id.delete;
SELECT assignment_id,enc_element_type_id , sum(encumbrance_amount),min(time_period_id),
max(time_period_id) from PSP_ENC_LINES
WHERE enc_control_id in
(SELECT enc_control_id from psp_enc_controls where action_code='I' and
run_id = psp_enc_sum_tran.g_run_id)
GROUP BY assignment_id, enc_element_type_id;
SELECT pelh.assignment_id,enc_element_type_id, sum(encumbrance_amount),min(pelh.time_period_id),
max(pelh.time_period_id) FROM PSP_ENC_SUMMARY_LINES
PESL, PSP_ENC_LINES_HISTORY PELH WHERE
PESL.status_code='A' and PELH.enc_summary_line_id=pesl.enc_summary_line_id
AND PELH.CHANGE_FLAG ='N' and EXISTS
(SELECT '1' from PSP_ENC_CHANGED_ASSIGNMENTS PECA where PECA.ASSIGNMENT_ID=
PESL.ASSIGNMENT_ID)
AND PESL.ENC_CONTROL_ID IN -- Changed PELH to PESL for 11510_CU2 Consolidated performance fixes.
(SELECT ENC_CONTROL_ID FROM PSP_ENC_CONTROLS WHERE ACTION_CODE='IU'
AND RUN_ID=PSP_ENC_LIQ_TRAN.G_RUN_ID)
GROUP BY PELH.ASSIGNMENT_ID,ENC_ELEMENT_TYPE_ID;
p_assignment_enc_ld_table.r_assignment_id.delete;
p_assignment_enc_ld_table.r_element_type_id.delete;
p_assignment_enc_ld_table.r_encumbrance_amount.delete;
p_assignment_enc_ld_table.r_begin_time_period_id.delete;
p_assignment_enc_ld_table.r_end_time_period_id.delete;