Overview
When encountering issues with the Accounts Receivable: Batch Payment Processing, it may be due to orphaned records in the WEB_PAYMENTS table. These orphaned records are entries that reference CARD_IDs no longer existing in the ccards table. This guide provides steps to identify and remove these orphaned records to resolve the issue.
Information
To resolve issues with the Accounts Receivable: Batch Payment Processing caused by orphaned records in the WEB_PAYMENTS table, follow these steps:
-
Identify Orphaned Records:
SELECT wp.* FROM web_payments wp LEFT JOIN ccards cc ON wp.CARD_ID = cc.CARD_ID WHERE cc.card_id IS NULL; -
Backup the WEB_PAYMENTS Table:
SELECT * INTO WEB_PAYMENTS_BACKUP FROM WEB_PAYMENTS; -
Delete Orphaned Records:
DELETE wp FROM web_payments wp LEFT JOIN ccards cc ON wp.CARD_ID = cc.CARD_ID WHERE cc.CARD_ID IS NULL; -
Regenerate Encryption Keys:
After deleting the orphaned records, run the Key Management tool (
KeyMgmt.exe) to regenerate the encryption keys.
Following these steps should resolve the issue with the Batch Payment Processing. If further issues arise, please contact support for additional assistance.
Frequently Asked Questions
- What causes orphaned records in the WEB_PAYMENTS table?
- Orphaned records occur when entries in the WEB_PAYMENTS table reference CARD_IDs that no longer exist in the ccards table, often due to mismatched keys with encrypted data.
- Why is it important to backup the WEB_PAYMENTS table before deleting records?
- Creating a backup ensures that you have a copy of the data in case any issues arise during the deletion process, allowing you to restore the table if necessary.
- What should I do if the initial delete query does not work?
-
If the initial delete query does not work, try using an alternative query provided by support, such as:
This query should effectively remove the orphaned records.DELETE wp FROM web_payments wp LEFT JOIN ccards cc ON wp.CARD_ID = cc.CARD_ID WHERE cc.CARD_ID IS NULL;
Priyanka Bhotika
Comments