34,587
社区成员
发帖
与我相关
我的任务
分享
declare @t table(brq varchar(10),erq varchar(10),hh int,ye dec(6,2))
insert into @t select '2006-01-02' ,'2012-10-1',1111 ,2.01
union all select '2006-01-05' ,'2012-10-31',1111 ,3.51
union all select '2006-01-10' ,'2012-10-1',1111 ,2.55
union all select '2006-01-02' ,'2012-10-30',2222 ,3.00
union all select '2006-01-04' ,'2012-10-1',2222 ,2.00
union all select '2006-01-05' ,'2012-10-1',3333 ,6.54
union all select '2006-01-06' ,'2012-10-1',3333 ,5.23
union all select '2006-01-07' ,'2012-10-1',3333 ,8.55
select * from @t where convert(nvarchar(10),getdate(),120) between brq and erq