摘要:
1 --日曆(sql server 2005) 2 3 CREATE TABLE T1 (ID INTEGER) 4 INSERT INTO T1 VALUES (1) 5 ---- 6 with x(dy,dm,mth,dw,wk) 7 as( 8 select dy, 9 day(dy) dm,10 datepart(m,dy) mth,11 datepart(dw,dy) dw, 12 case when datepart(dw,dy)=113 then datepart(ww,dy)-114 ... 阅读全文