title: SQL query to find rows where 1 column value matches another column on another row
body: <p>I have a database table with a column called 'symbol', that is unique via a non-clustered index.
  We now need to change the data in the 'symbol' column, using the data from another column in the same table, say column2. </p>
  
  <p>Trying to do an update, e.g.</p>
  
  <pre><code>update table
  set symbol = column2
  where column2 &lt;&gt; '' and
  deleted = 0
  </code></pre>
  
  <p>results in a 'Cannot insert duplicate key row in object' error, so there must be 1 or more rows existing in the table that already have a value in the symbol column that is equal to the value in column2, or there are some rows that have a duplicate column 2 value. </p>
  
  <p>I can find the rows that have duplicates in column2, but I'm struggling to come up with a query to find those rows that have a value in the symbol column that exists in any row in column2. Any one got any ideas?</p>
  
  <p>Thanks.</p>