title: How to use 'not in' query for Oracle SQL and Microsoft SQL
body: <p>I have two databases in which iam working. Oracle SQL and Microsoft SQL. I want to select only those values in oracle database which are not exists in sql server table (based on one common columns in both databases). My query is following</p>
  
  <pre><code>select instr_no from oracle.table where instr_no not in (select instr_no from microsoft.table where createdby is not null)
  </code></pre>
  
  <p>In c# i have created datatable and store sql server tables values in datatable. Now how can i select only those oracle table values which are not exists in this datatable(based on sql server table), Thanks in advance.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I have done it using the following query:</p>
  
  <pre><code> var myvar = dt.AsEnumerable().Select(r =&gt; r.Field&lt;string&gt;("instr_no")).Except(dt1.AsEnumerable().Select(r =&gt; r.Field&lt;string&gt;("instr_no")));
  </code></pre>
  
  <p>Above is working very nicely. There is one issue that i need to convert myvar variable again into datatable. Please guide, thanks.</p>