title: How can I link values in a text file to values in a SQL Server table?
body: <p><strong><em>UPDATE 2</em></strong></p>
  
  <p>Essentially, I'd like to pass the dataTable into SQL Server, but not actually "create it", just like a temporary thing using:</p>
  
  <pre><code>cmd.CommandText = "SELECT * 
                     FROM table1 
                     INNER JOIN dataTable 
                     ON sample.name = dataTable.name"
  </code></pre>
  
  <p>How can I pass the dataTable from vb.net (.NET 2.0) to SQL Server in a similar fashion?</p>
  
  <p><strong><em>UPDATE 1</em></strong></p>
  
  <p>So I'm thinking maybe passing the data from the text file into a datatable and using that to compare against the SQL Server table? How would I go about doing that if at all possible?</p>
  
  <p><strong><em>ORIGINAL POST</em></strong><br>
  I have a table in SQL Server 2012 (i.e., dbo.sample1) within the table there is a column that contains names (i.e., abc01, abc02, abc03, hijk01, hijk02...)</p>
  
  <p>I ran some vb code to extract certain file names without extension from a directory on my machine (i.e., abc01, abc02...) that met certain conditions, these file names were saved on separate lines within a text file.</p>
  
  <p>Is there any easier convenient way of linking ONLY the names on my text file to the ones on my table so as not to show any rows that are not on the text file? I figured I can sit and plug in a bunch of WHERE name = 'abc01'... but didn't really want to site there and do that for all of the names I have. But I'm not sure is this might even work correctly as I need to do an INNER JOIN on of 2 tables in the DB to the values in the text file.</p>
  
  <p>If this is a long problem, then please point me in the right direction and I can research and move forward with it, but any help is greatly appreciated, thanks!</p>