How can I generate a temporary table filled with dates in SQL Server 2000?

后端 未结 11 547
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 05:21

I need to make a temporary table that holds of range of dates, as well as a couple of columns that hold placeholder values (0) for future use. The dates I need are the firs

11条回答
  •  执念已碎
    2020-11-30 05:48

    select top (datediff(D,@start,@end)) dateadd(D,id-1,@start)
    from BIG_TABLE_WITH_NO_JUMPS_IN_ID
    

提交回复
热议问题