The following lines contain the word 'select', 'insert', 'update' or 'delete':
INSERT INTO po_session_gt
( key,
num1
)
SELECT l_key,
l_index_tbl(i)
FROM DUAL
WHERE EXISTS (SELECT 1
FROM po_price_adjustments_draft ADJD
WHERE (ADJD.draft_id = p_draft_id_tbl(i) --this condition makes sure that, both draft_id and price_adjustment_id cannot be null at the same time
OR (p_draft_id_tbl(i) IS NULL
AND ADJD.price_adjustment_id = p_price_adjustment_id_tbl(i)))
AND ADJD.price_adjustment_id =
NVL(p_price_adjustment_id_tbl(i),
ADJD.price_adjustment_id)
AND NVL(ADJD.change_accepted_flag, 'Y') = 'Y');
DELETE FROM po_session_gt
WHERE key = l_key
RETURNING num1
BULK COLLECT INTO l_dft_exists_index_tbl;