newbie question: how can i use result set returned by sp?..

  • My stored proc A calls stored proc B. B returns a result set. How can i append B's result set to A's result set? I just can't figure out T-SQL syntax to do that. Reading BOL and SQL Server FAQ didn't help... any clues?

  • INSERT #TempTable

    EXEC ProcB



    --Jonathan

  • -- In SP A...

    Create Table Table1 .....

    -- From SP A

    INSERT INTO Table1 (col list)

    EXEC SP_B

    -- as long SP_B's has

    1 result



    Once you understand the BITs, all the pieces come together

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

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