IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[f_horasTotalesMes]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
DROP FUNCTION [dbo].[f_horasTotalesMes]
GO
CREATE FUNCTION [dbo].[f_horasTotalesMes]
(@p_fecha_ff as smalldatetime,
@p_fecha_ff_b as smalldatetime )
RETURNS FLOAT
AS
BEGIN
declare @p_resul FLOAT
set @p_resul = (select 
datediff (HOUR,@p_fecha_ff,@p_fecha_ff_b))
RETURN @p_resul	
end
GO
