From 296e5b623c2a9ce97180ecd54f76c92a60b912d3 Mon Sep 17 00:00:00 2001 From: Rubbish Date: Mon, 25 Sep 2023 18:04:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 连锁分离单店.sql | 63 ++++++++++++------------------------------ 1 file changed, 18 insertions(+), 45 deletions(-) diff --git a/连锁分离单店.sql b/连锁分离单店.sql index 17e80d7..90feea5 100644 --- a/连锁分离单店.sql +++ b/连锁分离单店.sql @@ -16,49 +16,22 @@ SELECT * FROM TMemberTransHist WHERE FMemId IN (SELECT FMemId FROM TMember WHERE SELECT distinct FTypeId FROM TMemberCard WHERE FCompId = '3472333586818924544' SELECT * FROM TMemberCardType WHERE FId = '5100645820915463158' +SELECT * FROM QingDao_saidao12.dbo.TMemberCardType +SELECT * FROM QingDao_saidao12.dbo.TMemberCard +SELECT * FROM QingDao_saidao12.dbo.TMemberCardTypeSub + +-- +INSERT INTO QingDao_saidao12.dbo.TMemberCardType ([FId],[FNo],[FName],[FValueType],[FMaterial],[FPrice],[FCardFeeAmt],[FAcctId],[FDeposit],[FAcctId2],[FDeposit2],[FAcctId3],[FDeposit3],[FTimes],[FAlertBalance],[FMinRchgAmt],[FMinSaleAmt],[FSalePointMode],[FSalePointValue],[FRchgPointMode],[FRchgPointValue],[FPaySmsFee],[FTimeCard],[FValidityPeriod],[FValidityPeriodUnit],[FExpiredDate],[FDefaultMemo],[FCreateTime],[FAllowSale],[FAllowRchg],[FAllowUpgrade],[FDeptId],[FEnabled],[FNeedPush],[FNeedPushTimes],[FNeedPushExpired],[FPopupRemindExpiredDays],[FDisplay],[FLevel],[FOrder],[FDeleted],[FSaleMaxArrear],[FRchgMaxArrear],[FRetainRate],[FNewMemberOnly]) SELECT [FId],[FNo],[FName],[FValueType],[FMaterial],[FPrice],[FCardFeeAmt],[FAcctId],[FDeposit],[FAcctId2],[FDeposit2],[FAcctId3],[FDeposit3],[FTimes],[FAlertBalance],[FMinRchgAmt],[FMinSaleAmt],[FSalePointMode],[FSalePointValue],[FRchgPointMode],[FRchgPointValue],[FPaySmsFee],[FTimeCard],[FValidityPeriod],[FValidityPeriodUnit],[FExpiredDate],[FDefaultMemo],[FCreateTime],[FAllowSale],[FAllowRchg],[FAllowUpgrade],[FDeptId],[FEnabled],[FNeedPush],[FNeedPushTimes],[FNeedPushExpired],[FPopupRemindExpiredDays],[FDisplay],[FLevel],[FOrder],[FDeleted],[FSaleMaxArrear],[FRchgMaxArrear],[FRetainRate],[FNewMemberOnly] FROM TMemberCardType WHERE FId != '0' + +-- ˾ +INSERT INTO QingDao_saidao12.dbo.TMemberCardTypeSub ([FId],[FCompId],[FCardTypeId],[FAllowSale],[FAllowRchg],[FEnabled]) SELECT [FId],[FCompId],[FCardTypeId],[FAllowSale],[FAllowRchg],[FEnabled] FROM TMemberCardTypeSub WHERE FCompId = '3472333586818924544' +UPDATE QingDao_saidao12.dbo.TMemberCardTypeSub SET FCompId = '1' +INSERT INTO QingDao_saidao12.dbo.TMemberCard ([FCardId],[FCardNo],[FCardFaceNo],[FTypeId],[FValueType],[FCompId],[FMemId],[FState],[FCreateDate],[FExpiredDate],[FTotalTimes],[FUsedTimes],[FSaleCompId],[FSaleBillId],[FPaySmsFee],[FMemo],[FDeleted],[FBizEmpid]) SELECT [FCardId],[FCardNo],[FCardFaceNo],[FTypeId],[FValueType],[FCompId],[FMemId],[FState],[FCreateDate],[FExpiredDate],[FTotalTimes],[FUsedTimes],[FSaleCompId],[FSaleBillId],[FPaySmsFee],[FMemo],[FDeleted],[FBizEmpid] FROM TMemberCard WHERE FMemId IN (SELECT FMemId FROM TMember WHERE FCompId = '3472333586818924544') + + +SELECT [FCardId],[FCardNo],[FCardFaceNo],[FTypeId],[FValueType],[FCompId],[FMemId],[FState],[FCreateDate],[FExpiredDate],[FTotalTimes],[FUsedTimes],[FSaleCompId],[FSaleBillId],[FPaySmsFee],[FMemo],[FDeleted],[FBizEmpid] FROM TMemberCard WHERE FMemId IN (SELECT FMemId FROM TMember WHERE FCompId = '3472333586818924544') + +-- Աʷ +-- Ҫݣ +SELECT * FROM TMemberTransHist WHERE FCompId = '3472333586818924544' -INSERT INTO QingDao_saidao12.dbo.TMemberCardType ([FId],[FNo],[FName] - ,[FValueType] - ,[FMaterial] - ,[FPrice] - ,[FCardFeeAmt] - ,[FAcctId] - ,[FDeposit] - ,[FAcctId2] - ,[FDeposit2] - ,[FAcctId3] - ,[FDeposit3] - ,[FTimes] - ,[FAlertBalance] - ,[FMinRchgAmt] - ,[FMinSaleAmt] - ,[FSalePointMode] - ,[FSalePointValue] - ,[FRchgPointMode] - ,[FRchgPointValue] - ,[FPaySmsFee] - ,[FTimeCard] - ,[FValidityPeriod] - ,[FValidityPeriodUnit] - ,[FExpiredDate] - ,[FDefaultMemo] - ,[FCreateTime] - ,[FAllowSale] - ,[FAllowRchg] - ,[FAllowUpgrade] - ,[FDeptId] - ,[FEnabled] - ,[FNeedPush] - ,[FNeedPushTimes] - ,[FNeedPushExpired] - ,[FPopupRemindExpiredDays] - ,[FDisplay] - ,[FLevel] - ,[FOrder] - ,[FDeleted] - ,[FRowVersion] - ,[FSaleMaxArrear] - ,[FRchgMaxArrear] - ,[FRetainRate] - ,[FNewMemberOnly]) -INSERT INTO QingDao_saidao12.dbo.TMemberCard ([FCardId],[FCardNo],[FCardFaceNo],[FTypeId],[FValueType],[FCompId],[FMemId],[FState],[FCreateDate],[FExpiredDate],[FTotalTimes],[FUsedTimes],[FSaleCompId],[FSaleBillId],[FPaySmsFee],[FMemo],[FDeleted],[FBizEmpid])SELECT [FCardId],[FCardNo],[FCardFaceNo],[FTypeId],[FValueType],[FCompId],[FMemId],[FState],[FCreateDate],[FExpiredDate],[FTotalTimes],[FUsedTimes],[FSaleCompId],[FSaleBillId],[FPaySmsFee],[FMemo],[FDeleted],[FBizEmpid] FROM TMemberCard WHERE FMemId IN (SELECT FMemId FROM TMember WHERE FCompId = '3472333586818924544')