Is it possible to declare a cursor for the result set of a
stored procedure call?
I have experimented with :
But fails the syntax check
Yes it is. Something roughly along the lines of
EXECUTE ('DECLARE ThisCursor SCROLL KEYSET FOR EXEC db.dbo.sp_xxx')
Not sure if this method can return a cursorvar, you may have to use
sp_executesql in order to return the cursorvar (not sure if that is
> I have experimented with :
> exec db.dbo.sp_xxx
> But fails the syntax check
I am trying to store the results returned from a stored procedure so I can
walk through the results one row at a time. Does anyone know how I can do
this? or Is there another way? Thanks.
Dietrich L. Westbrooks