You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
391 B
8 lines
391 B
1 year ago
|
INSERT TMemberTransHistPayment(FMemId,FCardId,FBillType,FTransId,FTransDetailId,FPayTypeId,FPayAmt)
|
||
|
SELECT T.FMemId,A.FCardId,'XF',T.FBillId,A.FDetailId,A.FPayTypeId,A.FPayAmt
|
||
|
FROM TConsumeGoodsPayment AS A,TConsumeBill AS T
|
||
|
WHERE A.FBillId = T.FBillId
|
||
|
AND T.FMemId != 0
|
||
|
AND A.FDetailId NOT IN(SELECT FTransDetailId FROM TMemberTransHistPayment)
|
||
|
|
||
|
|