Quote:
Originally Posted by Svinseladden
this is what i did:
i did the:
select * from ps_gamedefs.dbo.items
where grade= ' 998 ' and that was emty.
i then did the select * from ps_gamedefs.dbo.items
where grade= ' 1107 '
|
a numerical value is NOT a string, and only string shall be simple-quoted.
so these 2 statements are "invalid" (they work but just because MSSQL try & success to convert your strings to numbers, this useless step SHALL be avoided).
Quote:
Originally Posted by Svinseladden
and put in all those items there in:
UPDATE ps_gamedefs.dbo.items
SET Grade= '998'
WHERE ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
|
is it supposed to have a sense ?!? that's not irony ! it's really meaningless.
Assuming " 'itemid' " means "one of the numerical values found before", Tnelis explained you just before that a "match from a list" statement is written: itemid in (val1, val2, ...., valN)
furthermore, if the 2 statements are supposed to be used together, manual copy of these "itemid" is the worst way, you must do:
UPDATE ps_gamedefs.dbo.items SET Grade=998 WHERE ItemID IN (
SELECT ItemID FROM ps_gamedefs.dbo.items WHERE Grade=1107)
which is of course a non-sense, since if you success to express what you wanna do, it simply comes to "changing all grade equal to 1107 to 998" where the ItemID is *definitively* NOT the concern.
so: UPDATE ps_gamedefs.dbo.items SET Grade=998 WHERE Grade=1107
Quote:
Originally Posted by Svinseladden
[...]
i can do the same too all of them but if i have to manualy change all of them in the mobitem list that will take weeks or something he he he
|
or you can
GOOGLE SQL UPDATE & learn a bit, yet said.