T-sql 递归构造连续日期序列
摘要:
with t(d) as(select GETDATE() union all select d +1 from t where d<GETDATE()+9)select * from t构造一个10天日期序列 with t(n,m) as(select 1,getdate() union all select n+1,getdate()+n from t where n<10)select m from t;构造一个带序号的日期序列 阅读全文
posted @ 2011-11-30 16:55 雨渐渐 阅读(314) 评论(0) 推荐(0)
浙公网安备 33010602011771号