SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO

IF EXISTS (Select * From sys.objects 
   Where object_id = OBJECT_ID(N'GetDescripcionSeccion') )
DROP Function GetDescripcionSeccion
GO


Create FUNCTION GetDescripcionSeccion 
                (@id_secc as integer)  
RETURNS varchar(50)  AS  
BEGIN 
/*
   Date: Apr 21,2016

   Obtiene la descripcion 
   de la seccion

*/

	Declare @Result as varchar(50)

	Select @Result = dbo.AllTrim(descripcion)
		From STOKSECC
		where id_secc = @id_secc

	return @Result
END
