I get this error in this simple SQL statement when trying to retrieve a string from a table.
Msg 245, Level 16, State 1, Procedure prViewRequirements, Line 18 Conversion
You are trying to return a varchar instead of int.
RETURN @DocumentDescription
Please either do
select @DocumentDescription
or use an output parameter (Recommended)
ALTER PROCEDURE [dbo].[prViewRequirements]
@WFRouteID int
, @DocumentDescription varchar(100) = null output
UPDATE - Here is the whole 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
*/