I want to use dynamic sql to select the database name for a cursor. Is this or something similar possible using sybase ASE?
create procedure myproc
@dbname = varchar(20) = null as
declare mycur cursor for select @dbname..mytable
... use cursor
go
You can create dynamically a temp table
something like
— and then
etc