The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT calendar
FROM ap_terms,
ap_terms_lines
WHERE ap_terms.term_id = ap_terms_lines.term_id
AND ap_terms.name = p_terms_name
AND ap_terms_lines.calendar is not null;
SELECT 'Y'
INTO l_cal_exists
FROM ap_other_periods aop,
ap_other_period_types aopt
WHERE aopt.period_type = l_calendar
AND aopt.module = 'PAYMENT TERMS'
AND aopt.module = aop.module -- bug 2902681
AND aopt.period_type = aop.period_type
AND aop.start_date <= trunc(p_terms_date)
AND aop.end_date >= trunc(p_terms_date);