The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT TRUNC(f.invoice_date) FII_EA_INV_DATE
,TRUNC(f.creation_date) FII_EA_ENTERED_DATE
,TRUNC(MIN(pay.due_date)) FII_EA_DUE_DATE
,f.invoice_currency_code FII_EA_TRAN_CURRENCY
,f.invoice_amount FII_EA_TRAN_AMT
,CASE WHEN COUNT(hold.hold_date) > 0
THEN '''||l_yes||'''
ELSE '''||l_no||'''
END FII_EA_EVER_ON_HOLD
,COUNT(DISTINCT aid.invoice_distribution_id) FII_EA_DIST_LINES
,tl.name FII_EA_TERMS
,f.source FII_EA_SOURCE
,'''||l_due_date_url||''' FII_EA_DUE_DATE_DRILL
,'''||l_tran_amt_url||''' FII_EA_TRAN_AMT_DRILL
,'''||l_ever_on_hold_url||''' FII_EA_EVER_ON_HOLD_DRILL
FROM ap_invoices_all f
,ap_payment_schedules_all pay
,ap_invoice_distributions_all aid
,ap_terms_tl tl
,ap_holds_all hold
WHERE f.invoice_id = :INVOICE_ID
'||l_org_where||' '||l_ea_supplier_where||'
AND f.invoice_id = pay.invoice_id (+)
AND f.invoice_id = hold.invoice_id (+)
AND f.cancelled_date IS NULL
AND f.invoice_id = aid.invoice_id (+)
-- Bug # 4491000 , Commented out following filter
-- AND f.invoice_type_lookup_code NOT IN (''EXPENSE REPORT'')
AND f.invoice_amount <> 0
AND f.terms_id = tl.term_id
AND tl.language = USERENV(''LANG'')
GROUP BY f.invoice_date
,f.creation_date
,f.invoice_currency_code
,f.invoice_amount
,tl.name
,f.source
';