select
i.invoice_number,
c.check_number,
p.payment_number,
eer.expense_report_num
from
AP_INVOICES_ALL i,
AP_CHECKS_ALL c,
AP_INVOICE_PAYMENTS_ALL p,
EXM_EXPENSE_REPORTS eer
where p.invoice_id = i.invoice_id
and c.check_id = p.check_id
and i.REFERENCE_KEY1=eer.EXPENSE_REPOrt_id
and i.PRODUCT_TABLE='EXM_EXPENSE_REPORTS'
i.invoice_number,
c.check_number,
p.payment_number,
eer.expense_report_num
from
AP_INVOICES_ALL i,
AP_CHECKS_ALL c,
AP_INVOICE_PAYMENTS_ALL p,
EXM_EXPENSE_REPORTS eer
where p.invoice_id = i.invoice_id
and c.check_id = p.check_id
and i.REFERENCE_KEY1=eer.EXPENSE_REPOrt_id
and i.PRODUCT_TABLE='EXM_EXPENSE_REPORTS'