Help Build a Query

04/29/2019 00:34 devdash#1
How can i build a query to change "CanRepair" column, i can build that query for spcific ID, but how can i make it for spcific degree & type for example

type: HEAVY
degree: 01


another example

type: EARRING
degree: 09




thanks in advance.
04/29/2019 01:20 NagySandor96#2
USE SRO_VT_SHARD
set CanRepair = 0 where in (select ID from _refobjcommon where Codename128 like '%09%EARRING%')

I used the db's long time ago, im not sure about the earrings' codename... but you can figoure it out easily how it works...
NS
04/29/2019 11:11 JohnDornel^#3
Quote:
Originally Posted by NagySandor96 View Post
USE SRO_VT_SHARD
set CanRepair = 0 where in (select ID from _refobjcommon where Codename128 like '%09%EARRING%')

I used the db's long time ago, im not sure about the earrings' codename... but you can figoure it out easily how it works...
NS
That query is wrong on so many levels I can't even count it.

UPDATE _RefObjCommon SET CanRepair = 0 WHERE CodeName128 LIKE 'ITEM_%_%_HEAVY_05_%_A_RARE'

(This will do it for CH/EU, Male + Female, Heavy Armor / Armor, 5th degree, ALL types of clothes, SOS)

% = anything

Use the example above and just build for whatever you need. I strongly advise you to "select" first and then "update" to prevent affecting rows you don't want to. Have fun.

04/29/2019 12:52 devdash#4
Quote:
Originally Posted by JohnDornel^ View Post
That query is wrong on so many levels I can't even count it.

UPDATE _RefObjCommon SET CanRepair = 0 WHERE CodeName128 LIKE 'ITEM_%_%_HEAVY_05_%_A_RARE'

(This will do it for CH/EU, Male + Female, Heavy Armor / Armor, 5th degree, ALL types of clothes, SOS)

% = anything

Use the example above and just build for whatever you need. I strongly advise you to "select" first and then "update" to prevent affecting rows you don't want to. Have fun.

thanks alot, i really appreciate it, i think what u just gave me, will help me alot in manyways.


#topic close please.
04/29/2019 16:04 NagySandor96#5
sure, i was wrong...
04/29/2019 16:46 devdash#6
Quote:
Originally Posted by NagySandor96 View Post
sure, i was wrong...
i didn't try urs actually, but i think it would work too, thanks for ur post.