SP returns two datasets. How get the second one?

  • There is a procedure in SQL 2000 that returns two datasets.

    I need to insert the output from the second dataset in a table.

    How do I jump to the second dataset?

    Robert

  • riga1966 (2/14/2008)


    There is a procedure in SQL 2000 that returns two datasets.

    I need to insert the output from the second dataset in a table.

    How do I jump to the second dataset?

    Robert

    Hello Robert,

    If you are sure that the stored procedure returns 2 data sets, then you can modify the stored procedure by identifying the second dataset result to be inserted into a global temporary table if you want to use it in the same session or else into a base table in the database.

    Thanks


    Lucky

  • Lucky,

    I did change stored procedure so that it returns only one dataset now.

    But I don't like this approach because

    it means I'll have to create another copy of that

    pcdcs_ReadAcctAddress procedure.

    I'm a contractor and doing a small project for the big bank

    to convert outside data into their existing system.

    It would be much easier for me just to call an existing

    proc.

    I remember when I was working with GUI a long time ago

    I was able to select a second output from procedure in VB.

    I think there should be a way to do it in T-SQL as well.

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

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