速通删除订单
找到订单
确认是否有重复的两条订单
SELECT *
FROM
TC.RecordArchive
WHERE
CarNO = '粤-B0K22T'
AND InTime = '2022-04-07 13:35:09';
找出重复的订单
SELECT
InTime,
OutTime,
InDeviceName,
OutDeviceName,
CardTypeName,
PayTypeName,
CarNO,*
FROM
TC.RecordArchive
WHERE
CarNO = '粤-B0K22T'
AND InTime = '2022-04-07 13:35:09'
AND PayTypeName = '微信'
找到汇总记录
SELECT
*
FROM
[Report].RecordOutTemp
WHERE
OptYear = 2022
AND chargedate = '2022-04-07'
AND CardTypeName = '临时车B'
AND PayTypeName = '微信';
汇总记录减去差异订单
/*
UPDATE [ Report ].RecordOutTemp
SET
Charge1 = Charge1 -{ 30 },
Charge4 = Charge4 -{ 30 },
Qty = Qty -{ 1 }
WHERE
OptYear = 2022
AND chargedate = '{2022-04-07}'
AND CardTypeName = '{临时车B}'
AND PayTypeName = '{微信}';
*/
删除差异订单
/*
DELETE
FROM
TC.RecordArchive
WHERE
CarNO = '{粤-B0K22T}'
AND InTime = '{2022-04-07 13:35:09}'
AND PayTypeName = '{微信}'
*/
「真诚赞赏,手留余香」
真诚赞赏,手留余香
使用微信扫描二维码完成支付