Anda mencoba mengembalikan varchar alih-alih int.
RETURN @DocumentDescription
Silakan lakukan
select @DocumentDescription
atau gunakan parameter keluaran (Disarankan)
ALTER PROCEDURE [dbo].[prViewRequirements]
@WFRouteID int
, @DocumentDescription varchar(100) = null output
UPDATE - Berikut adalah seluruh prosedurnya:
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
*/