How to execute a stored procedure by fetching row by row from a Table

In SQL, How to execute a stored procedure by fetching row by row from a Table ?

I have around 50 Stored Procedures which I have to execute one by one. All the stored procedures are mentioned in a Table along with their parameters.

At present, I am using a cursor to do this. Is it possible to implement the syntax through Row_Number - Partition Over by without using While Loop or Cursor ?
chokkaStudentAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle AbrahamsSenior .Net DeveloperCommented:
I don't think it's possible to do it without have a loop or a cursor.
Scott PletcherSenior DBACommented:
Not really.  But unless there's more than several thousand rows, even a cursor should do that just fine.

The problem is likely just waiting on all the stored procs to finish.  You could, instead, create a job for each that executes all the procs, then start the job.  Then your main code will get control back immediately after the job starts, you won't have to wait for all the procs to complete.
Kyle AbrahamsSenior .Net DeveloperCommented:
I also just found this:
http://rusanu.com/2009/08/05/asynchronous-procedure-execution/

You can apparently run procedures asynchronously.   You would insert them into a queue and then the service would run them in the background.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chokkaStudentAuthor Commented:
Thank you , So bottom line is - To execute stored procedures one by one , Either we need to use Cursor or While Loop. There is no other option within the 5-6 lines of SQL Syntax.
chokkaStudentAuthor Commented:
Thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.