create table #t(username nvarchar(50))
bulk insert #t from 'e:\名字列表.txt'
with
(
rowterminator='\n'
)
SELECT id=identity(int,1,1), t.username INTO #regtemp11 FROM #t t ORDER BY id DESC
declare @i int,@Count int
set @i=1
select @count=count(*) from #regtemp11
while( @i<@count )
BEGIN
update QPAccountsDB.dbo.AccountsInfo set QPAccountsDB.dbo.AccountsInfo.NickName=t.username
from QPAccountsDB.dbo.AccountsInfo,#regtemp11 t
WHERE UserID IN(SELECT TOP (@i) UserID FROM QPAccountsDB.dbo.AccountsInfo)
AND QPAccountsDB.dbo.AccountsInfo.UserID NOT IN(SELECT TOP (@i-1) ISNULL(UserID,0) FROM QPAccountsDB.dbo.AccountsInfo)
--AND QPAccountsDB.dbo.AccountsInfo.IsRobot=1
AND t.id=@i
set @i=@i+1
END
DROP TABLE #t
DROP TABLE #regtemp11
本站源码仅做学术研究,自娱自乐使用,不得用于赌博性质的非法商业用途!转载请说明出处!
棋牌资源网 » 网狐6603批量修改机器人昵称
棋牌资源网 » 网狐6603批量修改机器人昵称