title: Using Ids from temp table to update actual table
body: <p>I am selecting two values into a temp table.
  After I have done this, I want to do an update, to one of the tables I select from, on all the Id's that I just selected into my temp table.
  How do I do this?</p>
  
  <p>It sounds pretty simple I just can't really figure out where to begin.
  I tried </p>
  
  <pre><code>update table set value = @tempTable.value where id = @temptable.id
  </code></pre>
  
  <p>but of course that didn't work.
  I can, of course, do a select that gives me the update commands, for each entry in the temp table, but I would very much like to do this, in one process instead of having to execute the update commands afterwards.</p>
  
  <p>Do I need to make some foreach from the temp table?</p>