title: How to make a loop calling a stored procedure in SQL Server 2008 R2?
body: <p>I need to call a stored procedure several times. How can I put this in a loop?</p>
  
  <pre><code>DECLARE @return_value int,
                  @sinresultado varchar(200),
                  @svcmensaje varchar(200)
  
  EXEC    @return_value = [dbo].[ppocfdcancelacionwsejecuta]
                  @evcrfcemisor = N'BBA940707IE1',
                  @evcserie = N'XXAABB',
                  @evcfolio = N'666',
                  @sinresultado = @sinresultado OUTPUT,
                  @svcmensaje = @svcmensaje OUTPUT
  </code></pre>
  
  <p>I need to make <code>@evcfolio</code> to run from 1 to 10 in the same loop. Like a for in java and the value of <code>evcfolio</code> increase in 1 every loop.</p>
  
  <p>Thanks for your time.</p>