跨数据库导数据,可自选行内容


导入会员表:

select * from member_info where memberName ='jingqiu11'

update member_info set memberName='jiao2' where memberId='4a1981e254a04fa0b6e0c88817744f10'



insert member_info (
memberId,memberName,pwd,operationPwd,name,phone,balanceItemId,FreezeAmeny,createDate,
isLogin,isDel,workMeetNum,workRelNum,totalMeetNum,totalrelNum,email,addres,qq,headimg,typeItemId,levelId,
sex,isAduit,Balance,Integration,paipaiRelease,taobaoRelease,aliRelease,allCollect,allRelease,allFlow,safeMoneyItemId,
trustTypeItemId,lastLoginDate,RegIP,referrer,
vipValid,IsPassExam,
IsConversion,fundChengsIsRemind
)

select 
UserID,UserName,[PassWord],'E10ADC3949BA59ABBE56E057F20F883E',RealName,Mobile,'aeb422a7-dead-4b9a-8c85-a363238099e5',0,'2014-01-01 00:00:00.000',
1,0,0,0,0,0,Email,Province+City+[Address],QQ,UserFace,'895e4e18-bbd8-4728-9ced-f855201681cf','44051fcb-5e6b-44a5-9707-adb689e9a168',
 CASE Sex WHEN  '男' THEN 1 ELSE 2 END,1,[Money],Score,0,Point,0,0,Point,0,CASE KS_JoinShangbaoMoney WHEN  0.00 THEN '4306e7eedb194deb9a07e4110f4b2c14' ELSE '122160ce308245bea9408d7800349e13' END,
'7af33fc5e3a14efc99231c900e89f97e',LastLoginTime,KS_RegIP,(select MAX(username)  from shualodb.dbo.KS_PromotedPlan where AllianceUser=shualodb.dbo.KS_User.UserName),
dateadd(d,EDays,getdate()) ,3, 
1,0



 from shualodb.dbo.KS_User



delete member_info where createDate='2014-01-01 00:00:00.000'


KS_LogScore  积分收支名细

导入买卖号:
insert member_info_taobao (
taobaoId,memberId,treasurerNo,platformId,
isEnable,shopUrl,shopName,typeItemId,
createTime,Credibility,Stars,[address],remark,isSellShop
)

select 
ID,(select MAX(UserID)  from shualodb.dbo.KS_User where UserName=shualodb.dbo.MaiMaiUser.UserName) ,ShopName, CASE Tid WHEN  '20100598989251' THEN '652c904cb76a4e56b34e857f4dd7968c' ELSE 'c2bb1af8b7ea4cdd9e1f5688cfb57211' END ,
CASE IsDel WHEN  1 THEN 0 ELSE 1 END,'',ShopName,CASE AccountType WHEN  1 THEN '6a214d28b0a7445b8080ff2ef0997261' ELSE 'd38e1c995ae849fcb132b8819bb47d03' END,
AddDate,0,0,'soufadizi',[Description],0



 from shualodb.dbo.MaiMaiUser 


delete member_info_taobao where [address]='soufadizi'


导入发布点明细:

ALTER TABLE member_release_detail alter column memberId varchar(50) NULL
insert member_release_detail (
payNo,memberId,payItemId,areaItemId,
release,CurrentRelease,payTypeItemId,typeItemId,createDate,remark
)

select 
ID,(select MAX(UserID)  from shualodb.dbo.KS_User where UserName=shualodb.dbo.KS_LogPoint.UserName), CASE InOrOutFlag WHEN  1 THEN 'cc7b15e7-57ed-4ecb-8318-1712e18ac815' ELSE '5d2538ba-d6af-4b25-b90e-d60859677441' END ,'rewuqu',
Point,CurrPoint,'b805d545-9c59-46fa-b888-3bf2936d51b3','souzileibie',AddDate,Descript

 from shualodb.dbo.KS_LogPoint


delete member_release_detail where typeItemId='souzileibie'


导入资金明细:

insert Payments_Info (
payId,orderNo,fid,[source],payItemId,
memberId,amount,CurrentBalance,handlingCharges,payNo,payTypeItemId,
transactionName,typeItemId,isFreeze,createDate,remark
)

select 
ID,'dingdanbianhao','','',CASE IncomeOrPayOut WHEN  1 THEN 'cc7b15e7-57ed-4ecb-8318-1712e18ac815' ELSE '5d2538ba-d6af-4b25-b90e-d60859677441' END ,
(select MAX(UserID)  from shualodb.dbo.KS_User where UserName=shualodb.dbo.KS_LogMoney.UserName),[Money],CurrMoney,0,'jiaoyihao','b805d545-9c59-46fa-b888-3bf2936d51b3',
'shualo','souzileibie',0,PayTime,Remark


 from shualodb.dbo.KS_LogMoney


delete Payments_Info where orderNo='dingdanbianhao'


导入收藏点明细:

insert member_Collect_detail (
payNo,memberId,payItemId,areaItemId,
release,CurrentRelease,payTypeItemId,typeItemId,createDate,remark
)

select 
ID,(select MAX(UserID)  from shualodb.dbo.KS_User where UserName=shualodb.dbo. LogCollectPoint.UserName), CASE InOrOutFlag WHEN  1 THEN 'cc7b15e7-57ed-4ecb-8318-1712e18ac815' ELSE '5d2538ba-d6af-4b25-b90e-d60859677441' END ,'rewuqu',
Point,CurrPoint,'b805d545-9c59-46fa-b888-3bf2936d51b3','souzileibie',AddDate,Descript

 from shualodb.dbo.LogCollectPoint


delete member_Collect_detail where typeItemId='souzileibie'


导入流量点明细:


insert member_Flow_detail (
payNo,memberId,payItemId,areaItemId,
release,CurrentRelease,payTypeItemId,typeItemId,createDate,remark
)

select 
ID,(select MAX(UserID)  from shualodb.dbo.KS_User where UserName=shualodb.dbo. LogFlowPoint.UserName), CASE InOrOutFlag WHEN  1 THEN 'cc7b15e7-57ed-4ecb-8318-1712e18ac815' ELSE '5d2538ba-d6af-4b25-b90e-d60859677441' END ,'rewuqu',
Point,CurrPoint,'b805d545-9c59-46fa-b888-3bf2936d51b3','souzileibie',AddDate,Descript

 from shualodb.dbo.LogFlowPoint


delete member_Flow_detail where typeItemId='souzileibie'

导入积分明细:


insert member_integration_detail (
payNo,memberId,payItemId,area,
integration,CurrentIntegration,payTypeItemId,typeItemId,createDate,remark
)

select 
ID,(select MAX(UserID)  from shualodb.dbo.KS_User where UserName=shualodb.dbo.KS_LogScore.UserName), CASE InOrOutFlag WHEN  1 THEN 'cc7b15e7-57ed-4ecb-8318-1712e18ac815' ELSE '5d2538ba-d6af-4b25-b90e-d60859677441' END ,'rewuqu',
Score,CurrScore,'b805d545-9c59-46fa-b888-3bf2936d51b3','souzileibie',AddDate,Descript

 from shualodb.dbo.KS_LogScore


delete member_integration_detail where typeItemId='souzileibie'


导入提现明细:

insert member_withdrawal_info (
wId,memberId,codeNo,wayType,
taobaoNo,taobaoUrl,bankNumber,bankName,tenpayNumber,tenpayName,Amount,createTime,[status],
operUserId,operUserName,operTime,remark
)

select 
ID,(select MAX(UserID)  from shualodb.dbo.KS_User where UserName=shualodb.dbo. TiXian.UserName), 'liushuihao',CASE PaymentType WHEN  1 THEN '3762f7b1359c4689b8b5e6e582eb5c3e' WHEN  2 THEN '33b179fb144344ef8296e1e94e7fe66a' WHEN  3 THEN '5ca0fb72b2ed4548867c1c3c180c7569' WHEN  4 THEN '1cbb78dfd60644d9a7706e1064fe7386' ELSE '1cbb78dfd60644d9a7706e1064fe7386' END ,
RealName,Account,Account,RealName,Account,RealName,[Money],AddDate,CASE [Status] WHEN  0 THEN '5faaed0f2d724ba3999fcb18d6e1d443' WHEN  1 THEN '8b873a63488b4b8eae8ca0fdb609c5fc' WHEN  3 THEN 'd42d9f6f94524bfca4bdc0325ea58c82'  ELSE 'd42d9f6f94524bfca4bdc0325ea58c82' END ,
'7413cd58ff6d4e41ad7e291214ac8a98','shualo',EndDate,[Description]
 from shualodb.dbo.TiXian


delete member_withdrawal_info where codeNo='liushuihao'

--新数据库字符长度有可能不够,如果不够就改下长度


导入充值明细:

insert member_AutoCZ_info (
ID,memberId,
RealName,TradeNo,[Money],[Status],AddDate,EndDate,IP,PayType,Inputer,remark
)

select 
ID,(select MAX(UserID)  from shualodb.dbo.KS_User where UserName=shualodb.dbo.AutoCZ.UserName),
RealName,TradeNo,[Money],[Status],AddDate,EndDate,IP,PayType,Inputer,'zidongcongzi'
 from shualodb.dbo.AutoCZ


delete member_AutoCZ_info where remark='zidongcongzi'


导入信用评价记录


insert task_Evaluation (
ID,TaskID,Tid,
NameType,UserName,FriendName,[Title],Content,ReplyContent,HaoPing,ZhongPing,ChaPing,AddDate,ReplyDate,IP,remark
)

select 
ID,TaskID,CASE Tid WHEN  '20100598989251' THEN '652c904cb76a4e56b34e857f4dd7968c' ELSE 'c2bb1af8b7ea4cdd9e1f5688cfb57211' END,
NameType,UserName,FriendName,[Title],Content,ReplyContent,HaoPing,ZhongPing,ChaPing,AddDate,ReplyDate,IP,'pingjiaguanli'
 from shualodb.dbo.PingJia


delete task_Evaluation where remark='pingjiaguanli'

posted @ 2016-07-29 14:04  离。  阅读(19)  评论(0编辑  收藏  举报