Return a cursor

  • Dear sir,

    how to have a #cursor return from executing anther stored procedure.

    Thanks

  • I don't believe you can return a cursor, and quite honestly - it's a good thing. What is it you're trying to do?

    Perhaps a table variable, perhaps a temp table under the right circumstances, perhaps the result set from the stored procedure gets dumped into a temp table,etc...

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Agree that it is best to not use a cursor at all; however, if you use a GLOBAL cursor, you can pass it between procedures. The Global cursor remains for the duration of the connection.

    Toni

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply