title: SQL Server Joining Between Two Tables Based on Closest Value
body: <p>I have two sets of data, as shown below. 
  Table 1:</p>
  
  <pre><code>enter code here 
  ID     Value_1
  1      233.67
  2      83.28
  3      84.49
  4      1234.83
  </code></pre>
  
  <p>Table 2:</p>
  
  <pre><code>NewID  Value_3     Value_4
  5      NULL        83
  6      NULL        85
  7      NULL        235
  </code></pre>
  
  <p>I want to join the two tables in such a way that the resulting data set would look like below.</p>
  
  <pre><code>ID     NewID     Value_1     Value_2
  1      7         233.67      235
  2      5         83.28       83
  3      6         84.49       85
  4      NULL      1234.83     NULL
  </code></pre>
  
  <p>I know that using the ROUND command would cause future problems. Do any of you know how I could create the above resulting set?</p>