Arora
asked on
Dynamic Cursor
How do I create dyanamic cursors in Sql Server.
I created oracle procedure and I used
TYPE RCR_GENERAL IS REF CURSOR;
Rcr_Gp RCR_GENERAL;
I am looking for replacement to above piece.
Thanks,
Arora
Look at:
DECLARE @cursor_variable_name CURSOR
in Books Online (topic "DECLARE"). That may not be exact, but I think that's as close as SQL gets.
DECLARE @cursor_variable_name CURSOR
in Books Online (topic "DECLARE"). That may not be exact, but I think that's as close as SQL gets.
ASKER
I am looking something like
Open a cursor for table1 and close
Open a same cursor for table2
If it is not possible, please let me know any alternatives.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<<SELECT Clause>>
Here's a definition of Dynamic Cursors from Books Online
DYNAMIC Cursors
Defines a cursor that reflects all data changes made to the rows in its result set as you scroll around the cursor. The data values, order, and membership of the rows can change on each fetch. The ABSOLUTE fetch option is not supported with dynamic cursors.