|
|
|
|
use qingdao_baobeimeng
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SELECT * FROM TPayAccount WHERE FName LIKE '%<EFBFBD><EFBFBD><EFBFBD><EFBFBD>%'
|
|
|
|
|
|
|
|
|
|
SELECT * FROM TCompany WHERE FNo = '013'
|
|
|
|
|
|
|
|
|
|
SELECT * FROM TPayAccount WHERE FId = 5464408785164857671
|
|
|
|
|
|
|
|
|
|
SELECT * FROM TConsumeBill WHERE FCompId =3472612862772379648
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SELECT * INTO #Card FROM TMemberCard WHERE FCompId = 3472612862772379648
|
|
|
|
|
|
|
|
|
|
SELECT * FROM TMemberCardAccount WHERE FCardId IN(SELECT FCardId FROM #Card)
|
|
|
|
|
|
|
|
|
|
UPDATE A
|
|
|
|
|
SET A.FAcctId = 5175462275344078215
|
|
|
|
|
FROM TMemberCardAccount AS A
|
|
|
|
|
WHERE A.FCardId IN(SELECT FCardId FROM #Card)
|
|
|
|
|
AND A.FAcctId = 3
|
|
|
|
|
|
|
|
|
|
UPDATE A
|
|
|
|
|
SET A.FAcctId = 5175462275344078215
|
|
|
|
|
FROM TMemberCardAcctHist AS A
|
|
|
|
|
WHERE A.FCardId IN(SELECT FCardId FROM #Card)
|
|
|
|
|
AND A.FAcctId = 3
|
|
|
|
|
|
|
|
|
|
UPDATE A
|
|
|
|
|
SET A.FAcctId = 5175462275344078215
|
|
|
|
|
FROM TMemberCardOldAcctHist AS A
|
|
|
|
|
WHERE A.FCardId IN(SELECT FCardId FROM #Card)
|
|
|
|
|
AND A.FAcctId = 3
|
|
|
|
|
|
|
|
|
|
UPDATE A
|
|
|
|
|
SET A.FPayTypeId = 5175462275344078215
|
|
|
|
|
FROM TConsumeItemPayment AS A,TConsumeBill AS B
|
|
|
|
|
WHERE B.FCardId IN(SELECT FCardId FROM #Card)
|
|
|
|
|
AND A.FBillId = B.FBillId
|
|
|
|
|
AND A.FPayTypeId = 3
|
|
|
|
|
|
|
|
|
|
UPDATE A
|
|
|
|
|
SET A.FContentId = 5175462275344078215
|
|
|
|
|
FROM TMemberArrear AS A
|
|
|
|
|
WHERE A.FCardId IN(SELECT FCardId FROM #Card)
|
|
|
|
|
AND A.FContentId = 3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UPDATE A
|
|
|
|
|
SET A.FAcctId = 5175462275344078215
|
|
|
|
|
FROM TMemberSaleCard AS A
|
|
|
|
|
WHERE A.FCardId IN(SELECT FCardId FROM #Card)
|
|
|
|
|
AND A.FAcctId = 3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UPDATE A
|
|
|
|
|
SET A.FPayTypeId = 5175462275344078215
|
|
|
|
|
FROM TMemberSalePayment AS A,TMemberSaleBill AS B
|
|
|
|
|
WHERE B.FPayCardId IN(SELECT FCardId FROM #Card)
|
|
|
|
|
AND A.FBillId = B.FBillId
|
|
|
|
|
AND A.FPayTypeId = 3
|