The following lines contain the word 'select', 'insert', 'update' or 'delete':
select /* MOAC_SQL_CHANGE */ h.header_id
from oe_order_headers h
where h.creation_date between
trunc(nvl(p_start_date, add_months(sysdate, -10000)))
and trunc(nvl(l_end_date, add_months(sysdate, +10000)))
and h.upgraded_flag = 'Y'
AND EXISTS (SELECT 'x'
FROM oe_order_lines_all l
WHERE l.header_id = h.header_id
AND l.org_id = h.org_id
AND l.tax_code <> 'Exempt'
AND l.tax_exempt_flag <> 'E'
AND l.tax_rate is null
AND l.TAX_VALUE is null);
header_id_t.delete;