title: how to update multiple rows from subquery?
body: <p>I'm now using <code>DB2</code> and try to update multiple rows, but below query returns <code>SQL0811N</code>, that says </p>
  
  <p><em>The result of a scalar fullselect, SELECT INTO statement, or VALUES INTO statement is more than one row".</em></p>
  
  <p>I'm looking for the query which can update multiple rows by each values selected by sub-query. </p>
  
  <pre class="lang-sql prettyprint-override"><code>update
      table_004
  set
      status = 99,
      bar_date = (
          select
              max(foo_date) as bar_date
          from
              table_001 t1
              inner join
                  table_002 t2
              on  t1.keyA = t2.keyA
              inner join
                  table_003 t3
              on  t2.keyA = t3.keyA
              inner join
                  table_004 t4
              on  t4.keyB = t3.keyB
          where
              t1.id in(1, 2, 3, 4, 5)
          group by
              t1.id,
              t4.keyB
      )
  </code></pre>