Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002
    Posts
    9

    Question Unanswered: retrieve result set generated by a stored procedure

    I want to call other stored procedures in my stored procedure.
    However, when I tried to call a stored procedure which return a result set rather than a single record, I don't know how to catch it in my stored procedures?

    Are there some methods to catch up a result set returned by a stored procedure in another stored procedure?

    Thanks!

    Thomas

  2. #2
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    insert the resultset of the stored procedure into a table

    Code:
    create table 
      #tbl(spid        int
         , ecid        int
         , status      varchar(15)
         , loginame    varchar(20)
         , hostname    varchar(15)
         , blk         int
         , dbname      varchar(15)
         , cmd         varchar(25))
    
    insert into #tbl exec sp_who
    
    select * From #tbl
    Paul Young
    (Knowledge is power! Get some!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •