I have declared a temp table to hold all the required values as follows:
DECLARE @temp TABLE
(
Password INT,
IdTran INT,
Kind VARCHAR(16)
you could use a cursor:
DECLARE @id int
DECLARE @pass varchar(100)
DECLARE cur CURSOR FOR SELECT Id, Password FROM @temp
OPEN cur
FETCH NEXT FROM cur INTO @id, @pass
WHILE @@FETCH_STATUS = 0 BEGIN
EXEC mysp @id, @pass ... -- call your sp here
FETCH NEXT FROM cur INTO @id, @pass
END
CLOSE cur
DEALLOCATE cur