title: Returning data in non tabular form from SQL server
body: <p>Pardon me for the vague title, but I could not find more appropriate words for summarizing my problem.</p>
  <p>In the database there are two tables that I want to combine and retrieve data from:</p>
  <pre><code>Id   Name     Description               Id       Batch    Quantity
  1    Item_A     ....                     1         1A       25
  2    Item_B     ....                     1         1B       25
  3    Item_C     ....                     1         1C       50
  .                                        1         1D       50
  .                                        2         2A       21
                                           .          .        .
                                           .          .        .
  </code></pre>
  <p>I want combine the from the data in second table with its corresponding Id in the first table,
  that is providing the appropriate name and description for the Batches of items.</p>
  <p>A simple join does give me the data that I want, but joining the two tables produces a large table in which the the description column is repeated for every Batch with the same Id even though only one Description data for the same Id would be sufficient.</p>
  <p><strong>Is there any way that combines the Name and Description data to the corresponding Id value in the second table, but that does not produce redundant data, in which the Name and the fairly long Description column is not repeated for the same Id?</strong></p>
  <p>One solution that I have tried, is to retrieve the two tables separately, but by sorting according to the Id in the same order. In this way I can use simple mapping function to create a pseudo object like this:</p>
  <pre><code>Main{
     List&lt;Item&gt; Items
  }
  Item{
     string Name
     string Description
     List&lt;Quantity&gt; Quantities
  }
  Quantity{
      string Batch
      int Quantity
  }
  </code></pre>
  <p>However this breaks the data manipulation step in two languages and will make the code complicated and harder to understand.</p>
  <p>Preferably, I want to retrieve the data for all the items at once(with the execution of a stored procedure once). Can somebody show be a good way to do this?</p>