sql server 查詢某個時間段共有多少周及每週的日期段

sql 語句 select number+1 as wknum,dateadd(wk,number,'2017-01-01') as firstday, (case when year(dateadd(d,-1,dateadd(wk,number+1,'2017-01-01')))>2017 then '2017-12-31' else dateadd(d,-1,dateadd(wk,numbe
相關文章
相關標籤/搜索