select *
from AR_MISC_CASH_DISTRIBUTIONS_ALL t
where t.cash_receipt_id in (cash_receipt_id...);
for update;
select *
from AR_CASH_RECEIPT_HISTORY_ALL t
where t.cash_receipt_id in (cash_receipt_id....)
for update
其中cash_receipt_id 可以根据如下的SQL得到
select CASH_RECEIPT_ID
from AR_CASH_RECEIPTS_ALL
where RECEIPT_NUMBER in
( 'receipt_number');
in中为收款编号