create procedure sp_quatweek2 as begin set nocount on declare @intcount int declare @intwk_id int set @intcount=1 set @intwk_id=1 declare @today date set @today=GETDATE() declare @fromdate date declare @todate date while(@intcount<=30) begin set @fromdate=DATEADD(day,0,@today) set @todate=DATEADD(day,6,@today) insert into quat_week(quatfrom)values(@today) set @today=DATEADD(day,6,@today) set @intwk_id=@intwk_id+1 set @intcount=@intcount+1 end select * from quat_week with(nolock) end
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)