title: Update database not affect for different cases
body: <p>I have a problem, I want to create a condition for different cases, for example:</p>
  <blockquote>
  <p>when (WeekDay == 2) the field CanWork2 should be 1 but this not happen
  just change 1 field &quot;CanWork1&quot;</p>
  </blockquote>
  <pre><code>UPDATE
      Emps
  SET
      CanWork1 = CASE WHEN cd.WeekDay = 1 THEN 1 ELSE CanWork1 END,
      CanWork2 = CASE WHEN cd.WeekDay = 2 THEN 1 ELSE CanWork2 END,
      CanWork3 = CASE WHEN cd.WeekDay = 3 THEN 1 ELSE CanWork3 END,
      CanWork4 = CASE WHEN cd.WeekDay = 4 THEN 1 ELSE CanWork4 END,
      CanWork5 = CASE WHEN cd.WeekDay = 5 THEN 1 ELSE CanWork5 END,
      CanWork6 = CASE WHEN cd.WeekDay = 6 THEN 1 ELSE CanWork6 END,
      CanWork7 = CASE WHEN cd.WeekDay = 7 THEN 1 ELSE CanWork7 END
  FROM
      #PS_EMPLOYEES AS Emps
      CROSS JOIN _PS_checkdays1 AS cd
  </code></pre>
  <p><a href="https://i.stack.imgur.com/ok2hf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ok2hf.png" alt="enter image description here" /></a></p>