Must declare variable '%.*s'.
This error occurs when variables that were declared outside of the EXECUTE statement are not available to the command being executed.
For example, this procedure will produce error 137:
declare @mystr char(50) select @mystr="abc" exec ("select @mystr")
Rewrite the procedure so that it does not reference variables in the EXECUTE statement that were declared outside of it.