sql - Update few values on few records at once -


i'm trying update values in 2 columns on 2 records @ once.

insert .... on duplicate ... update ... doesn't work.

i have read post subject solution doesn't work me, here question. going wrong?

code:

[7.4.2017 10:21:07] executing query:  update sales    set (ind,otst) = case id                      when 7795 (759900,2.2)                     when 7799 (779900,5)                     else (ind,otst)                     end  id in(7795, 7799) , recno>1; 

error:

[7.4.2017 10:21:09] value null - native error: 30359

p.s. when change value in single column on multiple rows works fine.

[7.4.2017 11:33:17] executing query:

update sales    set ind = case id    when 7795 759900    when 7799 779900   else ind end,   otst = case id   when 7795 99    when 7799 77   else otst end id in(7795, 7799) , recno>1; 

[7.4.2017 11:33:17] ok. [7.4.2017 11:33:17] 3 rows affected.

thank much, stanislavl


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -