title: How to select rows from a DataTable where a Column value is within a List?
body: <p>Say you had a table in SQL and you wanted to find all the rows where a particular column could be one of 3 options. You could write something like this:</p>
  
  <pre><code>SELECT * FROM MyTable WHERE uid IN (123, 456, 789)
  </code></pre>
  
  <p>That's effectively what I want to do with a <code>DataTable</code> in VB. I saw this post:
  <a href="https://stackoverflow.com/questions/4123462/query-rows-that-the-datatable-field-contain-any-item-in-the-liststring">Query rows that the datatable field contain any item in the list&lt;string&gt;</a></p>
  
  <p>Which seemed to be exactly what I wanted, but it's not working as I expected it to. I basically just used a C# -> VB converter and plugged in my variables and came up with this:</p>
  
  <pre><code>Dim item = From a In dtCodes.AsEnumerable() Where
                  lstCodes.Any(Function(x) a.Field(Of String)
                  ("Code").ToUpper().Contains(x.ToUpper())) Select a
  </code></pre>
  
  <p><code>dtCodes</code> is a DataTable with a column <code>Codes</code> in it. <code>lstCodes</code> is a <code>List(Of String)</code> with some values in it.</p>
  
  <p><code>item</code> just has all of the rows from <code>dtCodes</code> though, regardless of whether or not their <code>Code</code> column value exists in <code>lstCodes</code>.</p>
  
  <p>What am I missing?</p>
  
  <p>edit; Note that I don't <em>have</em> to use LINQ, if there's an easier or better way.</p>