Free Fusion SQLAccounts PayableRead-only

Potential duplicate invoices (supplier + amount + number)

Same supplier with identical invoice_num and amount but different invoice_id — strong duplicate-payment indicator.

Tables used

ap_invoices_all poz_suppliers_v

Bind parameters

None — the statement runs as written; edit the literals in the WHERE clause to narrow it.

How to run it

Paste it into a BI Publisher data model as a SQL data set, or into QueryWell's Query Studio and run it against your pod with a reporting account. Results come back to a grid you can profile, chart and export with a SHA-256 hash.

SQLdba-ap-duplicate-invoices
SELECT
  i.vendor_id,
  s.vendor_name           AS supplier_name,
  i.invoice_num,
  i.invoice_amount,
  COUNT(*)                AS occurrences,
  LISTAGG(i.invoice_id, ', ') WITHIN GROUP (ORDER BY i.invoice_id) AS invoice_ids,
  MIN(i.invoice_date)     AS earliest,
  MAX(i.invoice_date)     AS latest
FROM   ap_invoices_all   i
JOIN   poz_suppliers_v   s ON s.vendor_id = i.vendor_id
WHERE  i.cancelled_date IS NULL
GROUP  BY i.vendor_id, s.vendor_name, i.invoice_num, i.invoice_amount
HAVING COUNT(*) > 1
ORDER  BY occurrences DESC, supplier_name

A single read-only SELECT against Oracle Fusion Cloud's supported reporting surface. Column names and views can differ by release and by the roles your reporting account holds, so validate the result against a report you already trust before relying on it.

apduplicatesfraud

Related

More Accounts Payable queries

Run it without the template cycle

QueryWell runs this and 81 other curated scripts against your own Fusion pod from one signed desktop app — grid, charts, profiling and hashed exports included. Perpetual licence, 14-day trial.