Hi,
I am wondering if there is any way where a string variable can be passed to a cursor instead of a select statement like
DECLARE @sql_str VARCHAR(255)
SET @sql_str='SELECT * FROM EMP'
DECLARE myEmp CURSOR FOR @sql_str
Is there any way where in I can accomplish the above requirement of passing a dynamic sql to a cursor.
Any help would be highly appreciated.
Thanks
-Prasad
Prasad Bhogadi
www.inforaise.com