I have the following cursor:
The idea is to consult a list of "Demands", the interesting thing is that some are created by users and others automatically by the system, within the list you want to know which are created by user and which by the system.
The cursor works correctly when executed.
However, when reading the query from my CODE BESIDE the list only contains one result, Demandad = 3.
It is clear to me that from SQL SERVER the results of the query are being shown separately, probably because I invoke the SELECT within the CURSOR, then the question is
What can I do so that these results are not thrown separately and so read my complete list?