How to execute stored procedure and save the results into temp table in mssql 2000

  • Hi friends,

    I have one stored procedure Test_db_list it ll display result depends on date range i have to store this results into temp table of another procedure

    Kindly give suggestion

  • raghuldrag - Thursday, December 7, 2017 12:30 AM

    Hi friends,

    I have one stored procedure Test_db_list it ll display result depends on date range i have to store this results into temp table of another procedure

    Kindly give suggestion

    Create a ## temp table, insert the result set into the ## temp from SP1, execute SP2, drop ## temp, need to ensure the code of SP2 references the ## temp table


    CREATE TABLE ##Temp (ID INT)
    go
    INSERT INTO ##Temp
    EXEC SP1
    go
    EXEC SP2
    go
    DROP TABLE ##TEMP

  • MSSQL 2000!

    Please don't use this for production 🙂

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

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