Create dynamic cursor in sybase asa
-
20-09-2019 - |
Question
I need to create a dynamic resultset in a stored procedure in Sybase ASA 9.
Lets say I have a query:
'SELECT '+@Description+', '+@Id+' From '+@Table;
I need to create a cursor to get all values of that query. How?
Solution
I have found the solution:
DECLARE @cursor CURSOR USING @cursorQuery;
Open @cursor
And so on.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow