摘要:
CREATE FUNCTION dbo.fun_GetWorkDay( @dt_begin datetime, @dt_end datetime) returns intASBEGIN DECLARE @workday int, @i int, @bz bit, @dt datetime IF @dt_begin > @dt_end SELECT @bz = 1, @dt = @dt_begin, @dt_begin = @dt_end, @dt_end = @dt ELSE SET @bz=0 SELECT... 阅读全文