Files
Client/Server/Database/DBScript/대만 서버 통합/이름 중복 1 단계.sql
LGram16 dd97ddec92 Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code:
- Client: Game client source (moved to Client/Client/)
- Server: Game server source
- GameTools: Development tools
- CryptoSource: Encryption utilities
- database: Database scripts
- Script: Game scripts
- rylCoder_16.02.2008_src: Legacy coder tools
- GMFont, Game: Additional resources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 20:17:20 +09:00

38 lines
680 B
Transact-SQL

declare @CID as int
declare @Count as int
declare @Name as varchar(16)
declare cursor1 cursor for
Select CID, Name From CharInfo
open cursor1
FETCH NEXT FROM cursor1 INTO @CID, @Name
WHILE @@FETCH_STATUS = 0
BEGIN
Set @Count = (Select Count(*) From Part2_DB.dbo.CharInfo Where Part2_DB.dbo.CharInfo.Name = @Name)
if @Count <> 0 And len(@Name) < 15
Begin
Update CharInfo Set Name = @Name + '0' Where CID = @CID
Update TblUnifiedCharList Set BeforeCharName = @Name + '0' Where BeforeCID = @CID
Update CharInfoEx Set NameChangeCount = 1 Where CID = @CID
End
FETCH NEXT FROM cursor1 INTO @CID, @Name
End
CLOSE cursor1
DEALLOCATE cursor1
sp_help TblUnifiedCharList