日期:2014-05-18 浏览次数:20484 次
declare @startdate datetime,@enddate datetime set @startdate='2012-3-11' set @enddate='2012-4-19' select convert(varchar(10),dateadd(day,number,@startdate),120) as col,isnull(进货量,0) from master..spt_values left join tb on tb.col=tb.convert(进货日期,120) where datediff(day,dateadd(day,number,@startdate), @enddate)>=0 and number>=0 and type='p'