Command for changing Item ID in Database

04/18/2019 01:47 campomanes25#1
Hello anyone got the sql command to change the item ID to a new ITEM ID that works for Inventory, Bag and Guild Warehouse?

I really appreciate your help.
08/27/2019 08:06 Fatcode#2
Hmmm the thought would be like this:

Query the database to look for the item id ex: 11323 and once found change it to 11324.
08/27/2019 19:13 xTwiLightx#3
You should take a look at the following function, which was developed for this purpose - kinda:
Code:
BOOL CDbManager::Conv(LPCSTR lpFileName)
08/28/2019 13:50 alfredico#4
I've done before using replace function, it could be risky in some cases, but may work for you.

Code:
UPDATE CHARACTER_01_DBF.dbo.INVENTORY_TBL SET m_Inventory = REPLACE(m_Inventory, ',OldId,', ',NewId,') WHERE m_Inventory LIKE '%,OldId,%'
There is a chance of altering other item params like an item count that matches the id or something else, so use at your own risk.