我有一张这样的表:
Date Day
-------------------------
2010-01-02 Saturday
2010-01-03 Sunday
2010-01-09 Saturday
2010-01-10 Sunday
........ ......
........ ........
我想将其显示如下:
FromDate FromDay ToDate ToDay
---------------------------------------------------------
2010-01-02 Saturday 2010-01-03 Sunday
2010-01-09 Saturday 2010-01-10 Sunday
........ ........ ........... ......
........ ........ ........... ......
我刚从http://blog.sqlauthority.com/2009/12/29/sql-server-get-date-of-all-weekdays-or-weekends-of-the-year/
复制了查询 But I don't know how to split as required.