title: Join two tables when the values in two columns don't match
body: <p>Table 1:</p>
  
  <pre><code>onode_c, dnode_c, dist1
  </code></pre>
  
  <p>Table 2:</p>
  
  <pre><code>onode_c, dnode_c, dist2
  </code></pre>
  
  <p>I need a query which returns</p>
  
  <pre><code>onode_c, dnode_c, dist1, dist2
  </code></pre>
  
  <p>for the records where <code>dist1</code> and <code>dist2</code> are not matching in Table 1 and Table 2</p>
  
  <pre><code>select  a.onode_c, a.dnode_c, trunc(a.dist1), trunc(b.dist2)
  from table1 a, table2 b
  where a.onode_c = b.onode_c and a.dnode_c = b.dnode_c and trunc(a.dist1) != trunc(b.dist2);
  </code></pre>
  
  <p>The above query returns the same records multiple times.</p>