Storing multiple result sets from stored porcedure

  • Hi There

    Does anyone knows about a way to store results from stored porcedure that returns multiple result sets.

    Sample stored porcedure:

    CREATE PROCEDURE testing

    AS

    SELECT 1 a,2 b;

    SELECT 3 a, 4 b, 5 c;

    GO

    Is is possible in TSQL to store this in multiple temp tables etc ?

  • You could create two temp tables in the outer procedure (assuming there is one) and then insert the results into those tables in your testing sproc.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • I don't know of a way to do it in T-SQL without modifying the definition of the procedure, but I think you can do it in SSIS with an ADO result set.

    John

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

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