executing stored procedure from a stored procedure

  • can i fire a stored procedure from a stored procedure, ??

    wht if it is returning an output parameter, how to capture this output value?

    iam looking for both answers can i collect resultset, and how can i collect output values

    thanks in advance

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

  • You can happily fire off stored procedures from within stored procedures.

    Let us suppose you have a return value. You could include syntax as follows

    DECLARE @lResult Int

    exec @lResult=usp_myproc

    If you have output variables then you would declare them as per @lResult

    Your execute line would be as follows

    exec @lResult=usp_myproc @outputvar1 OUTPUT , @outputvar2 OUTPUT

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

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