Call one stored procedure from another

  • Hi,

     

    I have two stored procedures say, A and B

    'A' returns some value (which is a text datatype). I need to execute 'A' and use the result that it return in procedure 'B'.

    Could someone tell me how I can do it?

    Thanks

  • do you use an "OUTPUT" keyword for the parameter that you want to return? You may see examples in BOL article CREATE PROCEDURE. See the example D there that shows how to create procedure with output parameter and how to run it.

    You may call one procedure from another up to 32 levels. The inner procedure should use OUTPUT keyword for your parameter so you can output the result into the variable in the outer level procedure.

    Regards,Yelena Varsha

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

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