Calling a stored procedure in another database

  • I have a stored procedure that I want to call a second stored procedure in another database (which will return a list based on the name passed in as a parameter). I am using the following call

    "EXEC SecondProcSynonym @paramName"

    But it is not working. Any ideas? Thanks!

  • you can just use 3 part naming if the db is on the same server:

    exec OtherDB.dbo.ProcName @myparam=1234

    ---------------------------------------
    elsasoft.org

  • Thanks! I was not passing along the parameter correctly. 🙂

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

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