While it is not something I generally recommend; it may just be easiest to use a
CURSOR
for this application.
This is a rough sample of what it could look like, it is up to use appropriate variable types/sizes and to work out what the
SELECT statement actually will be; so consider this a starting point
DECLARE @Input NVARCHAR(64)
DECLARE @Ouput NVARCHAR(64)
DECLARE rs CURSOR LOCAL STATIC FOR
SELECT InputFilePath, OutputFilePath
FROM #results
WHERE
FOR READ ONLY
OPEN rs
FETCH rs INTO @Input, @Output
WHILE (@@Fetch_Status = 0) BEGIN
EXECUTE ProcedureName @Input, @Ouput
FETCH rs INTO @Input, @Output
END
CLOSE rs
DEALLOCATE rs