Mob Rebuild Sql

02/26/2021 01:05 Vegas35#1
What is the proper way to construct this sql?
This one failed ,

Code:
Msg 245, Level 16, State 1, Line 6
Conversion failed when converting the varchar value 'MOB_CH_MANGNYANG' to data type int.
Code:
Update Tab_RefNest 
SET dwDelayTimeMin='4', dwDelayTimeMax='8', dwMaxTotalCount='7'
FROM Tab_RefNest AS A
INNER JOIN Tab_RefTactics AS B
ON B.dwTacticsID = A.dwNestID 
INNER JOIN _RefObjCommon  AS C
ON C.CodeName128 = B.dwTacticsID 
WHERE C.Rarity ='0' and CodeName128  NOT Like 'MOB_FW_%' and CodeName128  NOT Like 'MOB_THIEF_%' and CodeName128  NOT Like 'MOB_HUNTER_%' and CodeName128  NOT Like 'MOB_EU_%' and CodeName128 like 'MOB_%'
Thanks
02/26/2021 02:04 Laag#82#2
Quote:
Originally Posted by Vegas35 View Post
What is the proper way to construct this sql?
This one failed ,

Code:
Msg 245, Level 16, State 1, Line 6
Conversion failed when converting the varchar value 'MOB_CH_MANGNYANG' to data type int.
Code:
Update Tab_RefNest 
SET dwDelayTimeMin='4', dwDelayTimeMax='8', dwMaxTotalCount='7'
FROM Tab_RefNest AS A
INNER JOIN Tab_RefTactics AS B
ON B.dwTacticsID = A.dwNestID 
INNER JOIN _RefObjCommon  AS C
ON C.CodeName128 = B.dwTacticsID 
WHERE C.Rarity ='0' and CodeName128  NOT Like 'MOB_FW_%' and CodeName128  NOT Like 'MOB_THIEF_%' and CodeName128  NOT Like 'MOB_HUNTER_%' and CodeName128  NOT Like 'MOB_EU_%' and CodeName128 like 'MOB_%'
Thanks
Hello,

Error here

Code:
INNER JOIN _RefObjCommon  AS C
ON C.CodeName128 = B.dwTacticsID
Fix here

Code:
INNER JOIN _RefObjCommon  AS C ON C.ID = B.dwObjID
Select:

Code:
USE SRO_VT_SHARD
select C.CodeName128
FROM Tab_RefNest AS A
INNER JOIN Tab_RefTactics AS B ON B.dwTacticsID = A.dwNestID 
INNER JOIN _RefObjCommon  AS C ON C.ID = B.dwObjID 
WHERE C.Rarity ='0' and C.CodeName128  NOT Like 'MOB_FW_%' and C.CodeName128  NOT Like 'MOB_THIEF_%' and C.CodeName128  NOT Like 'MOB_HUNTER_%' and C.CodeName128  NOT Like 'MOB_EU_%' and C.CodeName128 like 'MOB_%'
Update:

Code:
USE SRO_VT_SHARD
Update Tab_RefNest 
SET dwDelayTimeMin='4', dwDelayTimeMax='8', dwMaxTotalCount='7'
FROM Tab_RefNest AS A
INNER JOIN Tab_RefTactics AS B ON B.dwTacticsID = A.dwNestID 
INNER JOIN _RefObjCommon  AS C ON C.ID = B.dwObjID 
WHERE C.Rarity ='0' and C.CodeName128  NOT Like 'MOB_FW_%' and C.CodeName128  NOT Like 'MOB_THIEF_%' and C.CodeName128  NOT Like 'MOB_HUNTER_%' and C.CodeName128  NOT Like 'MOB_EU_%' and C.CodeName128 like 'MOB_%'
Good Luck
02/26/2021 02:51 Vegas35#3
124 rows affected Thank you so much.:handsdown: