Tech Off Thread

5 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Retreive return records from a SP whithim a SP

Back to Forum: Tech Off
  • User profile image
    Shrage

    How can i retreive the return records from stored procedure. do i have to insert it into a memory Such as:

    Select * from <sp> Inner Join <table>

  • User profile image
    Maurits

    Shrage wrote:
    How can i retreive the return records from stored procedure. do i have to insert it into a memory Such as:

    Select * from <sp> Inner Join <table>


    INSERT/EXEC is one method from the old SQL Server 6.5 days.  Now that there are Table datatypes there may be a better way.

  • User profile image
    Shrage

    How do i get the return records of an Execute sp into a table variable?

    Or is there any other way to get resutls then execute?

  • User profile image
    wavesmash

    http://www.sommarskog.se/share_data.html

    How to share data between stored procedures

    An SQL text by Erland Sommarskog, SQL Server MVP.

    This article is also aviailable in Spanish in translation by Simon Hayes.

    Questions you often see in newsgroups about MS SQL Server are: How can I use the result set from one stored procedure in another or How can I use the result set from a stored procedure in a SELECT statement?

    This article presents different answers to these questions, and I also discuss the advantages and disadvantages of the methods I present.

    Some of the methods require that you actually rewrite the stored procedure you are calling. However, as long as this an option, this usually gives the best overall result. Here is a summary of the methods.

    These require you to rewrite the called procedure:

    These do not require a rewrite:


  • User profile image
    Shrage

    Thanks i was looking for such artical, i rememeber seeing it somehwere sometimes ago but it could not find it again

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.