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 2000 Forums
 SQL Server Development (2000)
 Dynamic cursor

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-09-14 : 15:42:42
Ben writes "Dear Gurus,

I have a question regarding dynamic cursor in SQL 2000.

How make the following cursor works:

create procedure myproc
( @TableName varchar(50)
@SqlServerName varchar(50) )
as
declare @v_jobid int
declare job_cursor cursor for
select @v_jobid = job_id from [@SqlServerName].[@TableName] where job_id > 100

open job_cursor
...
...


It is possible to crate above cursor in Sql server 2000?
How about using EXE(@sql)?

Thanks,"
   

- Advertisement -