是不是这样的?
create table tb(yest datetime,today datetime,tomorrow datetime,weekname varchar(10),weeks int)
declare @day int,@dt datetime
set @day=0
set @dt='2016-01-02'
while @day<365
begin
insert tb select dateadd(day,@day,@dt),dateadd(day,@day+1,@dt),dateadd(day,@day+2,@dt),datename(dw,@dt+@day),datediff(week,@dt,dateadd(day,@day,@dt))+1
set @day=@day+1
end
select * from tb
drop table tb |