title: Inner join using LINQ on DataTables
body: <p>I have these 2 DataTables, <code>customerTableDT</code> and <code>customerAliasesTableDT</code>. They are both populated from a database like this:</p>
  
  <pre><code>customerTableDT = UtilityDataAndFunctions.PerformDBReadTransactionDataTableFormat(String.Format("SELECT * FROM {0}", TableNames.customers));
  
  customerAliasesTableDT = UtilityDataAndFunctions.PerformDBReadTransactionDataTableFormat(String.Format("SELECT * FROM {0}", TableNames.customerAliases));
  </code></pre>
  
  <p>Now I'm trying to do an inner join on the two datatables like this:</p>
  
  <pre><code>var customerNames = from customers in customerTableDT.AsEnumerable()
                      join aliases in customerAliasesTableDT.AsEnumerable on customers.Field&lt;int&gt;("CustomerID") equals aliases.Field&lt;int&gt;("CustomerID")
                      where aliases.Field&lt;string&gt;("Alias").Contains(iString) select customers.Field&lt;string&gt;("Name")
  </code></pre>
  
  <p>But it gives me this error:</p>
  
  <pre><code>The type of one of the expressions in the join clause is incorrect.  Type inference failed in the call to 'Join'.
  </code></pre>
  
  <p>If I had to write in SQL about what I'm trying to do, its very simple:</p>
  
  <pre><code>SELECT * FROM CUSTOMERS C
  INNER JOIN CustomerAliases ALIASES ON ALIASES.CustomerID = C.CustomerID
  WHERE CA.Alias LIKE %STRING_HERE%
  </code></pre>
  
  <p>Any help ?</p>