Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 How to use cursor on Exec command

Author  Topic 

ryanlcs
Yak Posting Veteran

62 Posts

Posted - 2011-10-14 : 01:44:44
Hi

I got this command, at which by executing the command, it will result a result table.

How can I add a cursor onto it, as I wanted to loop the result table.

I tried this, but it failed.

Declare ChildResultLoop Cursor Fast_Forward For Exec Proc_Gen_SP_Result 'Param1','Param2'

Please advise.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-14 : 02:02:42
put the exec results on a temporary table use cursor over that

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -