title: SQL Comparing Two Columns in same table and update in another table
body: <p>Table:1         </p>
  
  <pre><code>Col1    Col2    Updated Dated   
  100     200     01-01-99    
  200     300     02-01-99    
  300     400     03-01-99    
  400     500     04-01-99    
  700     900     
  </code></pre>
  
  <p>Table 2:    </p>
  
  <pre><code>Col New Updated Data
  100 500
  700 900
  1000    No Values
  2000    No Values
  </code></pre>
  
  <p>From table 1 i want to compare col1 and col2 row by row or simple query find the value like 100 assinged to 200 but 200 assinged 300 like etc.. finally 400 assinged into 500. I want retrive the 500 fianlly then assinged into 100.its kind of Zig zag comparsion . how do do in SQL.</p>