日期:2014-05-17 浏览次数:20575 次
CREATE TABLE #t (eid INT, DATE DATETIME, flag INT )
GO
INSERT #t(eid,DATE,flag)
select 1,'2013-3-1',null union
select 1,'2013-3-2',null union
select 1,'2013-3-4',null union
select 1,'2013-3-5',null union
select 1,'2013-3-7',1 union
select 1,'2013-3-8',1 union
select 1,'2013-3-9',1 union
select 1,'2013-3-11',null union
select 1,'2013-3-12',null union
select 1,'2013-3-14',1 union
select 1,'2013-3-15',1 union
select 1,'2013-3-16',1 union
select 1,'2013-3-18',null union
select 2,'2013-3-1',null union
select 2,'2013-3-2',null union
select 2,'2013-3-4',null union
select 2,'2013-3-6',1 union
select 2,'2013-3-7',1 union
select 2,'2013-3-8',1 union
select 2,'2013-3-9',1 union
select 2,'2013-3-11',1 union
select 2,'2013-3-12',1 union
select 2,'2013-3-13',1 union
select 2,'2013-3-15',null union
select 2,'2013-3-16',null union
select 2,'2013-3-18',1 union
select 2,'2013-3-19',1 union
select 2,'2013-3-20',1 union
select 3,'2013-3-1',null union
select 3,'2013-3-2',null union
select 3,'2013-3-4',1 union
select 3,'2013-3-5',1 union
select 3,'2013-3-6',1 union
select 3,'2013-3-8',null union
select 3,'2013-3-9',null union
select 3,'2013-3-12',1 union
select 3,'2013-3-13',1