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.
230 lines
6.0 KiB
230 lines
6.0 KiB
|
|
USE QingDao_ShaXuan
|
|
GO
|
|
|
|
SELECT * FROM TUser
|
|
/*
|
|
SELECT * FROM TMember WHERE FMemNo = '00101096'
|
|
UPDATE TConsumeBill SET FMemID = 8148641139645296588 WHERE FMemNo = '00101096'
|
|
|
|
SELECT * FROM TMemberCard WHERE FCardId in(4638846115086199622,
|
|
5402991836228192347,
|
|
5530833927484260303,
|
|
6298360195710560250,
|
|
8704514538916062315,
|
|
9100361356189603986)
|
|
|
|
UPDATE A
|
|
SET A.FMemId = B.FMemId
|
|
FROM
|
|
TConsumeBill AS A,TMemberCard AS B
|
|
WHERE A.FCardId = B.FCardId
|
|
AND A.FCardId in(4638846115086199622,
|
|
5402991836228192347,
|
|
5530833927484260303,
|
|
6298360195710560250,
|
|
8704514538916062315,
|
|
9100361356189603986)
|
|
SELECT * FROM TMemberCardAcctHist WHERE FCardId = 0
|
|
|
|
UPDATE TMemberCardAcctHist SET FMemId = 0 WHERE FCardId = 0
|
|
*/
|
|
|
|
5578810805401765696
|
|
|
|
UPDATE TMember SET FMemNo = 'É¢¿Í',FName = '',FMobilePhone = '' WHERE FMemId = 0
|
|
|
|
SELECT * FROM TMember WHERE FMemId = 0
|
|
SELECT * FROM TMemberCard WHERE FMemId = 0
|
|
SELECT * FROM TMemberCourse WHERE FMemId = 0
|
|
SELECT * FROM TMemberTransHist WHERE FMemId = 0
|
|
SELECT * FROM TMemberCardAccount WHERE FMemId = 0
|
|
SELECT * FROM TMemberCardAcctHist WHERE FMemId = 0
|
|
SELECT * FROM TConsumeBill WHERE FMemId = 0 AND FMemNo != 'É¢¿Í'
|
|
SELECT * FROM TMemberSaleBill WHERE FMemId = 0
|
|
|
|
DELETE TMember WHERE FMemId = 0
|
|
|
|
INSERT TMember(FMemId,FMemNo,FName,FCompId,FTypeId,FCreateDate,FGender,FBirthdayType,FBirthday,FTelephone,FMobilePhone,FQQ,FWeChat,FIdCard,FEmail,FAddress,FProId,FChargeEmpId,FPoint,FRecvConsSMS,FRecvBulkSMS,FMemo,FCPW,FQPW)
|
|
VALUES (0,'É¢¿Í','É¢¿Í',1,0,'1753-01-01',0,1,0,'','','','','','','',0,0,0,0,0,'','','')
|
|
|
|
|
|
UPDATE TMemberCard SET FMemId = 22 WHERE FMemId = 0
|
|
UPDATE TMemberCourse SET FMemId = 22 WHERE FMemId = 0
|
|
|
|
|
|
UPDATE TMember SET FMemId = 5578810805401765696 WHERE FMemId = 0
|
|
UPDATE TMemberCard SET FMemId = 5578810805401765696 WHERE FMemId = 22
|
|
UPDATE TMemberCourse SET FMemId = 5578810805401765696 WHERE FMemId = 22
|
|
|
|
UPDATE TMember SET FMemId = 0 WHERE FMemId = 22
|
|
|
|
UPDATE A
|
|
SET A.FMemId = B.FMemId
|
|
FROM TMemberCardAccount AS A,TMemberCard AS B
|
|
WHERE A.FCardId = B.FCardId
|
|
AND A.FMemId = 0
|
|
|
|
UPDATE TMemberSaleBill SET FMemId = 5578810805401765696 WHERE FMemId = 0
|
|
UPDATE TConsumeBill SET FMemId = 5578810805401765696 WHERE FMemId = 0 AND FMemNo != 'É¢¿Í'
|
|
|
|
|
|
UPDATE TMemberTransHist SET FMemId = 5578810805401765696 WHERE FMemId = 0
|
|
UPDATE TMemberCourseHist SET FMemId = 5578810805401765696 WHERE FMemId = 0
|
|
UPDATE TMemberCardAcctHist SET FMemId = 5578810805401765696 WHERE FMemId = 0
|
|
|
|
SELECT * FROM TMember WHERE FMemId = 5578810805401765696
|
|
|
|
select * FROM TMemberSaleBill WHERE FMemId = 5578810805401765696
|
|
SELECT * FROM TConsumeBill WHERE FMemId = 5578810805401765696
|
|
|
|
SELECT * FROM TMemberCardAccount WHERE FMemId = 5578810805401765696
|
|
SELECT * FROM TMemberCardAcctHist WHERE FMemId = 5578810805401765696
|
|
SELECT * FROM TMemberTransHist WHERE FMemId = 5578810805401765696
|
|
|
|
DELETE TMemberCardAcctHist WHERE FCardId = 4724732528808117699
|
|
SELECT * FROM TConsumeBill WHERE FCardId = 4724732528808117699
|
|
|
|
SELECT * FROM TMemberCardAcctHist WHERE FMemId = 5022202462946528304
|
|
|
|
|
|
|
|
SELECT * FROM TMemberSaleBill WHERE FMemNo = '314'
|
|
|
|
|
|
|
|
|
|
select dbo.FNNewId()
|
|
|
|
|
|
SELECT * FROM TMember WHERE FMemId = 5578810805401765696
|
|
|
|
|
|
|
|
--Éú³É½»Ò×ÀúÊ·
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DECLARE @BillId BIGINT
|
|
SELECT @Billid = 4943641433720225154
|
|
|
|
DECLARE @CompId BIGINT
|
|
DECLARE @MemId BIGINT
|
|
DECLARE @CardId BIGINT
|
|
DECLARE @BillMemo VARCHAR(1000)
|
|
DECLARE @BillTime DATETIME
|
|
DECLARE @BillNo VARCHAR(30)
|
|
|
|
SELECT @CompId = FCompId,
|
|
@MemId = FMemId,
|
|
@CardId = FCardId,
|
|
@BillMemo = FBillMemo,
|
|
@BillTime = FBillTime,
|
|
@BillNo = FBillNo
|
|
FROM TConsumeBill
|
|
WHERE FBillId= @Billid
|
|
|
|
SELECT A.FId, A.FItemId ,A.FOrigPrice,FDiscount,FAmount,FDctPrice,A.FSequence, A.FQuantity,
|
|
A.FMemCourseId, A.FMemComboItemId, A.FUseFreeCourse, A.FDeptId,A.FPoint,
|
|
IDENTITY(int) FIndex
|
|
INTO #Item
|
|
FROM TConsumeItem AS A
|
|
WHERE A.FBillId = @Billid
|
|
|
|
--땮᱒
|
|
SELECT A.FId, A.FGoodsId ,A.FOrigPrice,FDiscount,FAmount,FDctPrice,A.FSequence, A.FQuantity, A.FUnitId,FStoreId,
|
|
A.FMemComboGoodsId, A.FDeptId,A.FPoint,
|
|
IDENTITY(int) FIndex
|
|
INTO #Goods
|
|
FROM TConsumeGoods AS A
|
|
WHERE A.FBillId = @Billid
|
|
|
|
--ÏîÄ¿Ö§¸¶Ã÷ϸ
|
|
SELECT FDetailId,FPayTypeId,FPayAmt
|
|
INTO #ItemPayment
|
|
FROM TConsumeItemPayment WITH(NOLOCK)
|
|
WHERE FBillId = @Billid
|
|
|
|
--²úÆ·Ö§¸¶Ã÷ϸ
|
|
SELECT FDetailId,FPayTypeId,FPayAmt
|
|
INTO #GoodsPayment
|
|
FROM TConsumeGoodsPayment WITH(NOLOCK)
|
|
WHERE FBillId = @Billid
|
|
|
|
EXEC PAuditConsumeMemberTransHist
|
|
@BillId = @Billid, --µ¥¾ÝID
|
|
@CompId = @CompId, --¹«Ë¾ID
|
|
@BillNo = @BillNo, --µ¥ºÅ
|
|
@BillTime =@BillTime, --µ¥¾Ýʱ¼ä
|
|
@BillType ='XF', --µ¥¾ÝÀà±ð
|
|
@MemId = @MemId, --»áÔ±id
|
|
@CardId = @CardId, --¿¨ID
|
|
@BillMemo = @BillMemo --µ¥¾Ý±¸×¢
|
|
|
|
DROP TABLE #Item
|
|
DROP TABLE #Goods
|
|
DROP TABLE #ItemPayment
|
|
DROP TABLE #GoodsPayment
|
|
|
|
|
|
|
|
|
|
SELECT * FROM TBizLog WHERE FUserNo = 'ADMIN' ORDER BY FTime desc
|
|
|
|
|
|
|
|
|
|
DELETE TBizLog WHERE FId = 25448
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UPDATE TMember SET FMemId = 0 WHERE FMemId = 22
|
|
|
|
SELECT * FROM TMember where FMemId = 5578810805401765696
|
|
SELECT * FROM TMemberCard where FMemId = 5578810805401765696
|
|
SELECT * FROM TMemberCardAccount where FMemId = 5578810805401765696
|
|
SELECT * FROM TMemberSaleBill where FMemId = 5578810805401765696
|
|
|
|
SELECT * FROM TMemberCourseHist WHERE FMemId = 7529966415005117122
|
|
|
|
|
|
UPDATE TMembreCard SET
|
|
|
|
UPDATE TM
|
|
|
|
SELECT * FROM TMemberCard WHERE FCardNo = '314'
|
|
|
|
SELECT * FROM TMember WHERE FName LIKE '%Ñîéª%'
|
|
|
|
SELECT * FROM TMemberCard WHERE FMemId = 0
|
|
|
|
|
|
|
|
SELECT * FROM TConsumeBill WHERE FBillId = 5022202462946528304
|
|
SELECT * FROM TConsumeBill WHERE FMemId = 0 and fcARDnO != ''
|
|
|
|
UPDATE TConsumeBill SET FMemId = 5022202462946528304 WHERE FMemId = 0 AND FMemNo = '20302'
|
|
|
|
SELECT * FROM TCompany
|
|
|