Tuesday, October 1, 2013

Execute a Stored Procedure Continuously For a Specific Number of Times


I have an Insert Stored Procedure an I want to execute it to 10,00,000 times to put some dummy data in my table, for this I used this….

DECLARE @Counter INT

SET @Counter = 1

WHILE (@Counter <= 1000000)
BEGIN
       EXEC [dbo].[usp_Aspx_SaveValues] 1,8,1,0
       SET @Counter = @Counter + 1
END

No comments:

Post a Comment