Using a variable in the DECLARE CURSOR statement 
Author Message
 Using a variable in the DECLARE CURSOR statement
I am creating a procedure that cycles through all the connections with a
cursor using the sysprocesses table.  I want to pass the server as a
parameter and I am having trouble using that parameter in the DECLARE CURSOR
statement.

Can anyone help

Thanks Much
Ryan Shaw



Thu, 05 Dec 2002 03:00:00 GMT
 Using a variable in the DECLARE CURSOR statement

If I well recognize your problem , use : exec[ute] ('select



Quote:
> I am creating a procedure that cycles through all the connections with a
> cursor using the sysprocesses table.  I want to pass the server as a
> parameter and I am having trouble using that parameter in the DECLARE
CURSOR
> statement.

> Can anyone help

> Thanks Much
> Ryan Shaw



Fri, 06 Dec 2002 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. SQL statement as variable in cursor DECLARE

2. DECLARE CURSOR with variable WHERE Statement

3. I want to declare a cursor for a variable select statement

4. Declaring Cursors using variables

5. declare curW cursor for EXEC spMySproc - Trying to assign sp resultset to cursor variable

6. Using a Variable as Column name in Select statement in a Cursor

7. using variables in select statement to open cursor

8. Use Cursor to DECLARE variables

9. Declare cursor SQL as variable

10. How to declare a cursor for a query which is variable

11. Declaring variables for fetching from cursor

12. HOW TO declare a cursor on variable tables


 
Powered by phpBB® Forum Software