If payments is linked to Invoices, and you want to load only payments records with a valid link you can try something like
LOAD * FROM INVOICES;
LEFT KEEP (INVOICES) LOAD * FROM PAYMENTS;
Or use exists() function in a where clause to load only records with an existing value in Table Invoices from Table Payments.
Please also check out Henric's blog post:
Hope this helps,
"I have all the payments, even the one's not linked to any requisition".
Add a WHERE EXISTS clause to the end of your LOAD statement. Something like this:
ReqNo AS TestReqNo,
PaymentReqNo AS ReqNo,
WHERE EXISTS (TestReqNo,PaymentReqNo);
DROP FIELD TestReqNo;
Note the use of a Test field as the first parameter, which is later dropped. You need to use the unchanged PaymentReqNo field name as the second parameter as that is what is available during the load.
Also note that with both tables having multiple common fields (date and key) you may want to CONCATENATE them into a TransactionTable.