UPDATE with CASE and IN – Oracle

You said that budgetpost is alphanumeric. That means it is looking for comparisons against strings. You should try enclosing your parameters in single quotes (and you are missing the final THEN in the Case expression). UPDATE tab1 SET budgpost_gr1= CASE WHEN (budgpost in (‘1001′,’1012′,’50055’)) THEN ‘BP_GR_A’ WHEN (budgpost in (‘5′,’10’,’98’,’0′)) THEN ‘BP_GR_B’ WHEN (budgpost in … Read more

MySql update two tables at once

It should be possible with a multi-table update, as described in the documentation. http://dev.mysql.com/doc/refman/5.5/en/update.html UPDATE Table_One a INNER JOIN Table_Two b ON (a.userid = b.userid) SET a.win = a.win+1, a.streak = a.streak+1, a.score = a.score+200, b.win = b.win+1, b.streak = b.streak+1, b.score = b.score+200 WHERE a.userid = 1 AND a.lid = 1 AND b.userid = … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)