title: How can I select rows that do not match corresponding rows in the same table?
body: <p>I'm trying to figure out how to work out this query.</p>
  
  <p>I have a table with multiple columns. Of these columns there are two: colA and colB.</p>
  
  <p>The values in colA and colB in a row will match a different row in the same table, however the actual values in those columns will not be equal.</p>
  
  <p>So for any row:</p>
  
  <pre><code>Col_A | Col_B
  val1.0  | val2.0
  </code></pre>
  
  <p>there will be another row </p>
  
  <pre><code>Col_A | Col_B
  val1.1| val2.1
  </code></pre>
  
  <p>There is an exception where this corresponding row does not exist and it is this row that I need to select.</p>
  
  <p>Any help with the logic around this is greatly appreciated.</p>
  
  <p>I've been working with queries of this type</p>
  
  <pre><code>Select * 
  from table1 e 
  where (e.Col_A = val1.0 and e.Col_B = val2.0)
  and (e.Col_A != val1.1 and e.Col_B ! = val2.1)
  </code></pre>
  
  <p>is this even close? The above strikes me as I write it that if one clause is true then the other must also be true.</p>
  
  <p>Thanks in advance for any help or hints.</p>
  
  <p>Additional info as there were requests for clarification.</p>
  
  <p>What I'm doing is updating a table. This table has a column that will catch and mark any exceptions to the rule I stated above.</p>
  
  <p>The table has about 12 columns and two of these columns can have one of two possible values. Value Types for these two columns are varchar2(30) Normally for any row that has a set of values there will be another row that has the other values. Some of the other unrelated columns can be the same but not necessarily.</p>
  
  <p>The code I have implemented is similar to below and is based on the left join suggestion from KAJ. However it seems to return too many rows in a straight query and in the update it actually updates every row.</p>
  
  <pre><code>Update TableA Set Col_Ex = ('Exception')
  Where Exists 
  (Select ... Example from Kaj s suggestion below);
  </code></pre>