假如表就两个字段
记录名称 日期
------解决方案--------------------
select *, '今天 ' rec from [Table] where datediff(day,日期,getdate())=0
Union All
select *, '昨天 ' rec from [Table] where datediff(day,日期,getdate())=1
Union All
select *, '本周 ' rec from [Table] where datediff(wk,日期,getdate())=0
------解决方案--------------------
select * from 表 where convert(char(10),日期,120)=convert(char(10),getdate(),120)
select * from 表 where convert(char(10),日期,120)= convert(char(10),dateadd(day,-1,getdate()),120)
select * from 表 where datepart(week,日期)=datepart(week,getdate())