Tuesday, October 23, 2018

Retrieve Vendor Payment Associated to a Purchase Order

Sample SQL query to retrieve a Purchase Order's associated Vendor Payment:

SELECT APPLIED_TRANSACTION_ID, B.* FROM TRANSACTIONS A
JOIN TRANSACTION_LINKS B
ON A.TRANSACTION_ID = B.ORIGINAL_TRANSACTION_ID
WHERE A.TRANSACTION_ID = 54  --- > this is the Purchase Order's Internal ID
AND B.LINK_TYPE = 'Payment'

No comments:

Post a Comment