Hi,
I run a stored procedure and it returns a result of a couple thousand rows. I need to get these rows into a temp table or table variable, and then loop through the results. I need to run 1 or 2 queries for each rows in this result set. What way is the best to go?
Table variable / temp table. Cursor / while loop. I want to pass the results to a different stored procedure to be processed like explained above.
What is the best practice?
Thanks!
Hugh
MS Sql Server LazyDBA home page