传奇三合区SQL程序
--说明:此SQL脚本专为GT合区而写,以下一区表示被合并区,二区表示合并区
--思路:将二区的ID和角色名全部加符号以示区分,比如我用"2"。
--提示:1、先在一区的SQL中建立两个数据库account2、game2,将二区的account和game1两个库倒入或者还原到以上两个库中。
--提示:2、然后在下面的@name数值输入你想加上的符号,比如@name='2'。
--提示:3、查询一区装备库的最后一个生成物品序列号,并输入到下面的@make数值中
--提示:4、没有进行寄售、行会数据库的合并
--严重提示:合区前请先备份好数据库,否则后果自负
DECLARE @name varchar(1),@make int
set @name='2'
set @make=69938836
print '正在更新二区ID库...'
UPDATE [account2].[dbo].[TBL_ACCOUNT]
SET FLD_LOGINID=rtrim(FLD_LOGINID)+@name
UPDATE [account2].[dbo].[TBL_ACCOUNTADD]
SET FLD_LOGINID=rtrim(FLD_LOGINID)+@name
print '正在更新二区角色库...'
UPDATE [game2].[dbo].[TBL_ABILITY]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@name
UPDATE [game2].[dbo].[TBL_CHARACTER]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@name,FLD_USERID=rtrim(FLD_USERID)+@name
UPDATE [game2].[dbo].[TBL_ITEM]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@name,FLD_MAKEINDEX=FLD_MAKEINDEX+@make
UPDATE [game2].[dbo].[TBL_MAGIC]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@name
UPDATE [game2].[dbo].[TBL_QUEST]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@name
UPDATE [game2].[dbo].[TBL_RELATPOINT]
SET FLD_USERID=rtrim(FLD_USERID)+@name
UPDATE [game2].[dbo].[TBL_SAVEDITEM]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@name,FLD_MAKEINDEX=FLD_MAKEINDEX+@make
print '正在合并ID数据库...'
insert into [account].[dbo].[TBL_ACCOUNT]
SELECT * FROM [account2].[dbo].[TBL_ACCOUNT]
INSERT INTO [account].[dbo].[TBL_ACCOUNTADD]
SELECT * FROM [account2].[dbo].[TBL_ACCOUNTADD]
PRINT '正在合并角色数据库...'
INSERT INTO [game1].[dbo].[TBL_ABILITY]
SELECT * FROM [game2].[dbo].[TBL_ABILITY]
INSERT INTO [game1].[dbo].[TBL_CHARACTER]
SELECT * FROM [game2].[dbo].[TBL_CHARACTER]
INSERT INTO [game1].[dbo].[TBL_ITEM]
SELECT * FROM [game2].[dbo].[TBL_ITEM]
INSERT INTO [game1].[dbo].[TBL_MAGIC]
SELECT * FROM [game2].[dbo].[TBL_MAGIC]
INSERT INTO [game1].[dbo].[TBL_QUEST]
SELECT * FROM [game2].[dbo].[TBL_QUEST]
INSERT INTO [game1].[dbo].[TBL_RELATPOINT]
SELECT * FROM [game2].[dbo].[TBL_RELATPOINT]
INSERT INTO [game1].[dbo].[TBL_SAVEDITEM]
SELECT * FROM [game2].[dbo].[TBL_SAVEDITEM]
PRINT '合区工作完
--思路:将二区的ID和角色名全部加符号以示区分,比如我用"2"。
--提示:1、先在一区的SQL中建立两个数据库account2、game2,将二区的account和game1两个库倒入或者还原到以上两个库中。
--提示:2、然后在下面的@name数值输入你想加上的符号,比如@name='2'。
--提示:3、查询一区装备库的最后一个生成物品序列号,并输入到下面的@make数值中
--提示:4、没有进行寄售、行会数据库的合并
--严重提示:合区前请先备份好数据库,否则后果自负
DECLARE @name varchar(1),@make int
set @name='2'
set @make=69938836
print '正在更新二区ID库...'
UPDATE [account2].[dbo].[TBL_ACCOUNT]
SET FLD_LOGINID=rtrim(FLD_LOGINID)+@name
UPDATE [account2].[dbo].[TBL_ACCOUNTADD]
SET FLD_LOGINID=rtrim(FLD_LOGINID)+@name
print '正在更新二区角色库...'
UPDATE [game2].[dbo].[TBL_ABILITY]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@name
UPDATE [game2].[dbo].[TBL_CHARACTER]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@name,FLD_USERID=rtrim(FLD_USERID)+@name
UPDATE [game2].[dbo].[TBL_ITEM]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@name,FLD_MAKEINDEX=FLD_MAKEINDEX+@make
UPDATE [game2].[dbo].[TBL_MAGIC]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@name
UPDATE [game2].[dbo].[TBL_QUEST]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@name
UPDATE [game2].[dbo].[TBL_RELATPOINT]
SET FLD_USERID=rtrim(FLD_USERID)+@name
UPDATE [game2].[dbo].[TBL_SAVEDITEM]
SET FLD_CHARACTER=rtrim(FLD_CHARACTER)+@name,FLD_MAKEINDEX=FLD_MAKEINDEX+@make
print '正在合并ID数据库...'
insert into [account].[dbo].[TBL_ACCOUNT]
SELECT * FROM [account2].[dbo].[TBL_ACCOUNT]
INSERT INTO [account].[dbo].[TBL_ACCOUNTADD]
SELECT * FROM [account2].[dbo].[TBL_ACCOUNTADD]
PRINT '正在合并角色数据库...'
INSERT INTO [game1].[dbo].[TBL_ABILITY]
SELECT * FROM [game2].[dbo].[TBL_ABILITY]
INSERT INTO [game1].[dbo].[TBL_CHARACTER]
SELECT * FROM [game2].[dbo].[TBL_CHARACTER]
INSERT INTO [game1].[dbo].[TBL_ITEM]
SELECT * FROM [game2].[dbo].[TBL_ITEM]
INSERT INTO [game1].[dbo].[TBL_MAGIC]
SELECT * FROM [game2].[dbo].[TBL_MAGIC]
INSERT INTO [game1].[dbo].[TBL_QUEST]
SELECT * FROM [game2].[dbo].[TBL_QUEST]
INSERT INTO [game1].[dbo].[TBL_RELATPOINT]
SELECT * FROM [game2].[dbo].[TBL_RELATPOINT]
INSERT INTO [game1].[dbo].[TBL_SAVEDITEM]
SELECT * FROM [game2].[dbo].[TBL_SAVEDITEM]
PRINT '合区工作完
Tags:
作者:佚名评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)
查看完整评论