title: Filtering SQL data into multiple DataTables in a single DataSet
body: <p>This should be simple, but it's escaping me right now as I have not written in VB in over a decade.<br>
  I have a stored procedure that gets a list of students and their assigned homeroom teacher.<br>
  Very basic - just the three columns: <code>FirstName</code>, <code>LastName</code>, <code>Teacher</code>.<br></p>
  
  <p>What I need is to load the data into a DataSet where each <code>Teacher</code> has their own DataTable filled with the students assigned to them. </p>
  
  <p>Sample data:<br></p>
  
  <p><img src="https://i.stack.imgur.com/lRGkO.png" alt="Sample data"> </p>
  
  <p>So in the example above, I would end up with 3 DataTables named <code>Adams</code>, <code>Taggert</code> and <code>Dublin</code>, each populated with the students associated with them all in a single DataSet in such a way that I could call the data with: </p>
  
  <pre><code>For Each dr As DataRow In ds.Tables("Taggert").Rows
      ' Do something with dr("FirstName").ToString
  Next
  </code></pre>
  
  <p>Any help would be appreciated.</p>