SELECT
check_id,
SUBSTR (invoice_payment_id, 1, 15) invoice_payment_id,
amount,
payment_base_amount,
invoice_base_amount,
accounting_date,
period_name,
posted_flag,
accounting_event_id,
invoice_id,
org_id
FROM AP_INVOICE_PAYMENTS_ALL
WHERE invoice_id = '166014'
ORDER BY check_id;