I've always just added these manually to RM00401, but this should work. Just fill in your payment number and un-comment the second row.
SELECT DOCNUMBR, RMDTYPAL, 2 AS DCSTATUS, BCHSOURC, TRXSORCE, CUSTNMBR, CHEKNMBR, DOCDATE, 0 AS NEGQTYSOPINV
--INTO RM00401
FROM RM20101
WHERE (DOCNUMBR = 'PYMNT7593302')
------------------------------
Jim Harris
Director of Information Systems
ExamWorks, Inc.
Atlanta GA
------------------------------
Original Message:
Sent: Jan 25, 2023 09:47 AM
From: David Morinello
Subject: Targeted Rebuild of RM00401?
Does anyone have a SQL Script to manually do a limited repair/rebuild of the RM00401 ?
In this case, one payment record is in RM20101 but is not present in RM00401.
I just want to rebuild the one, not look through the 35 million.
Why not do Check Links? 35 million rows in Receivables Open Transactions. (Don't get me started on why...)

Thoughts?
------------------------------
David Morinello
Senior Developer
TruckPro LLC
Cordova TN
------------------------------