Quote:
Originally Posted by castor4878
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).
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
or you can GOOGLE SQL UPDATE & learn a bit, yet said.
|
not that i want to be rude or anything but this you said was
Quote:
|
useless,a non-sense, and so on
|
i did last night. and changed all mobs just the way i want them to drop in 8 hours. all 70 maps are now done..
so thanks to all that gave me the:
select * from ps_gamedefs.dbo.items
where grade= ' x '
and
UPDATE ps_gamedefs.dbo.items
SET Grade= 'x'
WHERE ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
sure worked for me. this was easy:-)
Quote:
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)
|
UPDATE ps_gamedefs.dbo.items
SET Grade= 'x'
WHERE ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
does work. and ItemID is ItemID, all have it. this is normaly done when i like have a 1000+ grade i want to change to 998 or lower. just put in all the item id's from the old grade and your done.
or if you need stuff from the BIG 999 list. just pick the stuff you want. put it in:
UPDATE ps_gamedefs.dbo.items
SET Grade= 'x'
WHERE ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
OR ItemID= 'itemid'
with a new grade you find that have nothing in it before. and you have a new bag of stuff you can grade a monster with.
for me this looks easy. fast and well for me fun:-)