title: When using Query Syntax in C# "Enumeration yielded no results". How to retrieve output
body: <p>I have created this query to fetch some result from database.
  <a href="https://stackoverflow.com/questions/2896241/how-to-create-query-syntax-for-multiple-datatable-for-implementing-in-operator-of">Here is my table structure</a>.</p>
  <p>What exaclty is happening.</p>
  <blockquote>
  <p>DtMapGuestDepartment as Table 1</p>
  <p>DtDepartment as Table 2</p>
  <p>Are being used</p>
  </blockquote>
  <pre><code>    var dept_list=  from map in DtMapGuestDepartment.AsEnumerable()
                      where map.Field&lt;Nullable&lt;long&gt;&gt;(&quot;GUEST_ID&quot;) == DRowGuestPI.Field&lt;Nullable&lt;long&gt;&gt;(&quot;PK_GUEST_ID&quot;)
                      join 
                      dept in DtDepartment.AsEnumerable()
                      on map.Field&lt;Nullable&lt;long&gt;&gt;(&quot;DEPARTMENT_ID&quot;) equals dept.Field&lt;Nullable&lt;long&gt;&gt;(&quot;DEPARTMENT_ID&quot;)
                      select dept.Field&lt;string&gt;(&quot;DEPARTMENT_ID&quot;);
  </code></pre>
  <blockquote>
  <p><strong>I am performing this query on
  DataTables and expect it to return me
  a datatable.</strong></p>
  </blockquote>
  <p>Here I want to select distinct department from Table 1 as well which will be my next quest. Please answer to that also if possible.</p>