I need to call a stored procedure several times. How can I put this in a loop?
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
I need to make @evcfolio to run from 1 to 10 in the same loop. Like a for in java and the value of evcfolio increase in 1 every loop.
Thanks for your time.
1 Answer