日期:2014-05-17 浏览次数:20639 次
declare @MyCounter int declare @MyDateTime datetime set @MyCounter = 1 set @MyDateTime = '2012-10-5 00:00:00' while(@MyCounter < 16) begin while(@MyDateTime < '2012-10-5 23:59:59') begin insert into dbo.H_MURunTime(MUId,[CurTime],RunTime) values(@MyCounter,@MyDateTime,1) set @MyDateTime = dateadd(hh,1,@MyDateTime) end set @MyCounter = @MyCounter + 1 end
declare @MyCounter int declare @MyDateTime datetime set @MyCounter = 1 set @MyDateTime = '2012-10-5 00:00:00' while(@MyCounter < 16) begin while(@MyDateTime < '2012-10-5 23:59:59') begin insert into dbo.H_MURunTime(MUId,[CurTime],RunTime) values(@MyCounter,@MyDateTime,1) set @MyDateTime = dateadd(hh,1,@MyDateTime) end set @MyCounter = @MyCounter + 1 SET @MyDateTime = '2012-10-5 00:00:00' end