title: SQL Server MERGE columns after a Left Join?
body: <p>I am relatively new to SQL Server so I hope you can help.</p>
  
  <p>Basically I have two tables of information. The first looks like:</p>
  
  <ul>
  <li><strong>table1</strong> [<code>ID, Name</code>]</li>
  <li><strong>table2</strong> [<code>FKID, ID, Name</code>]</li>
  </ul>
  
  <p>I want to do a statement like:</p>
  
  <pre><code>SELECT table1.Name, table2.Name
  FROM table1
  LEFT JOIN table2 ON table2.FKID = table1.ID
  </code></pre>
  
  <p>This results in something like:</p>
  
  <pre><code>['Name 1a', 'Name 2a']
  ['Name 1b', NULL]
  ['Name 1c', NULL]
  </code></pre>
  
  <p>But what I want is to just select ONE column, that either being <code>Name 1x</code> or <code>Name 2x</code> if it wasn't null (there was no key match on the left join).</p>
  
  <p>I imagine the typical response will be to solve this using my programming language, but this is proving to be extremely difficult in Visual Web Developer using GridViews and all this nonsense, so what would be very helpful would be a database solution.</p>
  
  <p>Thanks a lot!</p>