How to insert values into a table when executing a sp??

  • Hi All,

    I need to be able to insert the values returned from an SP directly into a table without altering the SP. Can this be done on the EXEC command line?

    Thanks

  • Yes this can be done.

     

    insert into tablename exec spname parameters

    remeber to have the values returning by your sp in the same order as the table column

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • Great. Thanks - I knew there was a way

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

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