U probeert een varchar te retourneren in plaats van int.
RETURN @DocumentDescription
Doe alsjeblieft of
select @DocumentDescription
of gebruik een uitvoerparameter (aanbevolen)
ALTER PROCEDURE [dbo].[prViewRequirements]
@WFRouteID int
, @DocumentDescription varchar(100) = null output
UPDATE - Hier is de hele procedure:
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
*/