title: Retrieve specific number of rows in a SQL Server query
body: <p>Rows:</p>
  
  <pre><code>1  Test1
  2  Test2
  3  Test3
  12 Test4
  5  Test1
  6  Test2
  7  Test1
  8  Test2
  </code></pre>
  
  <p>I am trying to achieve export xml data file from ssis package.  </p>
  
  <p>An example: I need to create 2 rows per file. What sql command can ensure return correct 2 rows per time if that query in the SSIS loop container.</p>