QUERY BUILDER
#4

Nope the query is correct. Or you want this to apply for only 2 items, because what I posed is only valid for range of items with the a_index  between 10019 and 1512( if there are 100 items between these range, this will apply on all the items)

 

For only 2 items just make(there are 2 methods)

UPDATE t_item
SET a_rare_prob_0 = 6, a_rare_prob_1 = 6, a_rare_prob_2 = 6, a_rare_prob_3 = 6, a_rare_prob_4 = 6, a_rare_prob_5 = 6,
a_rare_index_0 = 14, a_rare_index_1 = 14, a_rare_index_2 = 14, a_rare_index_3 = 14, a_rare_index_4 = 14, a_rare_index_5 = 14
WHERE a_index in (10019, 1512);
Or this:

UPDATE t_item
SET a_rare_prob_0 = 6, a_rare_prob_1 = 6, a_rare_prob_2 = 6, a_rare_prob_3 = 6, a_rare_prob_4 = 6, a_rare_prob_5 = 6,
a_rare_index_0 = 14, a_rare_index_1 = 14, a_rare_index_2 = 14, a_rare_index_3 = 14, a_rare_index_4 = 14, a_rare_index_5 = 14
WHERE a_index = 10019 OR a_index = 1512;

if you add  = before between it will generate a error, and ";" it is not necessary, it only specifices, the query to executes(if you want to execute 2 queries in 1 you will need ";"  to separate the queries)

 

if you run only 1 query  ";" is not necessary, only if you run multiple queries in 1 file.(in MSSQL you can run multiple lines without ";", but more queries in 1 will  increase the query timeout, plus it has a limit on this, on how big the query is)



Messages In This Thread
[No subject] - by dethunter12 - 07-02-2013, 11:18 PM
[No subject] - by someone - 07-02-2013, 11:59 PM
[No subject] - by dethunter12 - 07-03-2013, 12:04 AM
[No subject] - by someone - 07-03-2013, 03:53 PM
[No subject] - by [email protected] - 01-29-2014, 04:04 PM
[No subject] - by DeChamp3 - 01-29-2014, 04:42 PM
[No subject] - by [email protected] - 02-04-2014, 06:59 AM
[No subject] - by DeChamp3 - 02-04-2014, 11:27 AM
[No subject] - by [email protected] - 02-04-2014, 11:55 AM
[No subject] - by DeChamp3 - 02-04-2014, 12:10 PM
[No subject] - by [email protected] - 02-07-2014, 02:18 AM
[No subject] - by Nymphetamine - 02-07-2014, 04:39 PM
[No subject] - by Johnny5 - 02-07-2014, 08:25 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)