DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Howto: Retrieving a result set from another stored procedure

  1. #1
    Mike Guest

    Howto: Retrieving a result set from another stored procedure


    Hi,

    I am curious if SQL is able to do this.

    I know howto call a stored procedure from within a stored procedure.

    However how do one retrieve the result of the stored procedure being
    called if the result is a resultset(multiple rows)?


    I have tried funny things like creating a table and
    use the DML - INSERT INTO .... etc. (Not suppose to work as DML is meant
    for tables only?)

    Any ideas?

    Yhanks in advance

    Mike
    ps. I will be grateful if you can reply to my account.





  2. #2
    DaveSatz Guest

    Re: Howto: Retrieving a result set from another stored procedure

    SQL Server,
    you can do
    INSERT table (coumns, ...)
    EXEC myProc

    or in SQL Server 2000, you can write a user-defined function that returns a
    table.

    --

    HTH,
    David Satz
    Principal Software Engineer
    Hyperion Solutions
    { SQL Server 2000 SP1/7.0 SP3/6.5 SP5a } { Cold Fusion 5/4.5.1 SP2 } { VSS }
    (Please reply to group only - emails answered rarely)
    -----------------------------------------------------------------

    "Mike" <kaipower@myrealbox.com> wrote in message
    news:3b9b675d$1@news.devx.com...
    >
    > Hi,
    >
    > I am curious if SQL is able to do this.
    >
    > I know howto call a stored procedure from within a stored procedure.
    >
    > However how do one retrieve the result of the stored procedure being
    > called if the result is a resultset(multiple rows)?
    >
    >
    > I have tried funny things like creating a table and
    > use the DML - INSERT INTO .... etc. (Not suppose to work as DML is meant
    > for tables only?)
    >
    > Any ideas?
    >
    > Yhanks in advance
    >
    > Mike
    > ps. I will be grateful if you can reply to my account.
    >
    >
    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center