摘要:
declare@tabletable(周次int,起始日期varchar(10),结束日期varchar(10))declare@datevarchar(10),@date_oldvarchar(10),@date_Endvarchar(10),@iint,@i_oldintset@date='2011-01-03'set@date_End='2012-05-05'set@date_old=@dateset@i=datepart(week,dateadd(day,-1,@date))set@i_old=@iwhile(@date<=@date_End)be 阅读全文