Passing sum to stored procedure

  • Hi

    Is it possible to pass a sum of vars to a SP ?

    I've tried this but it gives me an error

    exec mysp

    @param = (@var1 + @var2)

    Thank you !

  • The only operation permitted in the EXEC command is to concatenate strings.

    So you would have to add your two variables first, and then use THAT parameter in the EXEC command

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

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