rjuarez71 (11/24/2015)
Good morning,Just to ADD, I saw that adding
DECLARE x_cursor CURSOR STATIC READ_ONLY FOR ...
Solves the issue
best regards 🙂
From MSDN,
"STATIC
Defines a cursor that makes a temporary copy of the data to be used by the cursor. All requests to the cursor are answered from this temporary table in tempdb; therefore, modifications made to base tables are not reflected in the data returned by fetches made to this cursor, and this cursor does not allow modifications."
That may not be what the user originally wanted. The goal is to display the results of the fetches in the order indicated in the SELECT. I played with the original solution provided and it works fine on my end.
----------------------------------------------------