EXEC MO_GLOBAL.SET_POLICY_CONTEXT('S',204)
SELECT
pay.PAYMENT_ID
,pay.CHECKRUN_NAME PPR_NAME
,pay.CHECK_DATE
,pay.CHECK_NUMBER DOCUMENT_NUMBER
,pay.AMOUNT
,pay.CURRENCY_CODE
,pay.VENDOR_NUMBER
,pay.CURRENT_VENDOR_NAME
,pay.CURRENT_VENDOR_SITE_CODE
,pay.PAYMENT_METHOD_CODE
,pay.BANK_ACCOUNT_NAME
,pay.BANK_ACCOUNT_NUM
,pay.BANK_ACCOUNT_TYPE
,pay.ORG_ID
,pay.VOID_DATE
,pay.BANK_NAME
,pay.BANK_CURRENCY_CODE
,pay.PAYMENT_METHOD
,pay.CHECK_STATUS
,pay.PAYMENT_PROFILE_NAME
,pay.PROCESSING_TYPE
,pay.PAYMENT_DOCUMENT_NAME
,pay.PAYMENT_TYPE
,pay.STATUS_LOOKUP_CODE
,inv.INVOICE_ID
,inv.PAYMENT_NUM
,inv.PERIOD_NAME
,inv.INVOICE_NUM
,inv.INVOICE_DATE
,inv.AMOUNT INV_AMOUNT
FROM AP_CHECKS_V pay,AP_INVOICE_PAYMENTS_V inv
WHERE 1=1
AND pay.CHECK_ID =inv.CHECK_ID
AND PAY.PAYMENT_ID = inv.PAYMENT_ID
AND CHECKRUN_NAME LIKE '%PPR%NAME%'
ORDER BY CHECKRUN_NAME, inv.INVOICE_NUM
No comments:
Post a Comment