Hello,
I would like to create a stored procedure in a SQL 2000 database which
utilizes two cursors, one based on a SQL query, and a second which is
instantiated as an empty cursor. The procedure will then iterate
through the recordset of the populated cursor, make a procedural call
using data in the recordset and append rows to the empty cursor based
on return data from these calls. Once the empty cursor is populated,
I would like to return its data as the return recordset of the stored
procedure.
This tasks involves a few steps of which I am not sure whether or not
they are possible. The first is the ability to instantiate an empty
cursor, the second is the ability to append rows to a cursor and the
third is the ability to return the contents of a cursor as a resultant
recordset from a stored procedure.
If anyone can help me with any of these issues, it would be greatly
appreciated. Alternatively, if anyone knows of an easier way I could
go about accomplishing the same feat, please let me know. I am
attempting to do this in order to avoid making multiple calls to a
database. Thanks in advance.
John Fleming