Hi, I created a simple stored proc which returns a string
create proc im.mmtest as
select 'testvalue'
go
then I call the SP and set its return value to a variable. This block is executed by selecting all three lines and pressing F5. I do see the value when the exec statement is executed, but I do not get the string value back in select @ret_var
.
Please help me understand why. I am using this in a complicated SP and don't know why the value from the SP is not displayed correctly.
declare @ret_var as varchar(10)
exec @ret_var = im.mmtest
select @ret_var
Thank you in advance for your help.