Hi,
I would like to create a function width condition :
ALTER
FUNCTION [dbo].[colorLine](@numberRow [int]) RETURNS [varchar]
AS
BEGIN
DECLARE @moduloSql int
SET @moduloSql = @numberRow % 1
IF @moduloSql > 0
RETURN 'Red';
ELSE
RETURN 'Transparent';
END
;
But I have this message :
Msg 455, Level 16, State 2, Procedure colorLine, Line 7
The last statement included within a function must be a return statement.