Stai cercando di restituire un varchar invece di int.
RETURN @DocumentDescription
Per favore, fallo
select @DocumentDescription
oppure usa un parametro di output (consigliato)
ALTER PROCEDURE [dbo].[prViewRequirements]
@WFRouteID int
, @DocumentDescription varchar(100) = null output
AGGIORNAMENTO - Ecco l'intera procedura:
alter procedure dbo.prViewRequirements
@WFRouteID int
, @DocumentDescription varchar(100) = null output
AS
select @DocumentDescription = '' -- Init
select @DocumentDescription = DocumentDescription
from tbFollowOnTracking
where WFRouteID = @WFRouteID
and IsActive = 1
return 0
go
/* Examples
declare @DocumentDescription varchar(100) = ''
exec dbo.prViewRequirements @WFRouteID = 10, @DocumentDescription = @DocumentDescription output
select @DocumentDescription
*/