/*查询异常*/
Select * from RSM_GatheringBill
Where
Amount<>ExtDecimalA
and
Code In
(
Select Distinct ChargeUpGatheringBillCode from RSM_SettleGatheringBillDetail Where ParentBillCode IN (Select Code From RSM_SettleGatheringBill Where IsChecked = '1')
)
/*查询结算单记账情况*/
Select Amount,ExtDecimalA,* From RSM_GatheringBill Where Code = '结算单号'