Du forsøger at returnere en varchar i stedet for int.
RETURN @DocumentDescription
Gør venligst enten
select @DocumentDescription
eller brug en outputparameter (anbefalet)
ALTER PROCEDURE [dbo].[prViewRequirements]
@WFRouteID int
, @DocumentDescription varchar(100) = null output
OPDATERING - Her er hele proceduren:
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
*/