select id,WenHao from GW_LZ where datediff(hh,FSTime,getdate())>24 and datediff(hh,FSTime,getdate)<=120
--1 select id,WenHao from GW_LZ where datediff(hh,FSTime,getdate())>24 where datediff(day,'1900-01-01',FSTime)%7+1 not in(6,7) --2 select id,WenHao from GW_LZ where datediff(hh,FSTime,getdate())>24 where (datepart(dw,FSTime))+@@datefirst-1)%7 not in(0,7)
好象不对啊, select id,WenHao from GW_LZ where datediff(day,'1900-01-01',FSTime)%7+1 not in(6,7) and datediff(hh,FSTime,getdate())>24 select id,WenHao from GW_LZ where datediff(hh,FSTime,getdate())>24 and datediff(hh,FSTime,getdate()) <=120select id,WenHao from GW_LZ where datediff(hh,FSTime,getdate())>24 and ((datepart(dw,FSTime))+@@datefirst-1)%7 not in(0,7) 我的FSTime='2009-1-2 23:52:00'是这个,到现在肯定没超过24小时,今天是周日啊,才过了不到一个小时啊, 可是,我都能吧这条记录查出来啊
and datediff(hh,FSTime,getdate)<=120
select id,WenHao from GW_LZ where datediff(hh,FSTime,getdate())>24
where datediff(day,'1900-01-01',FSTime)%7+1 not in(6,7)
--2
select id,WenHao from GW_LZ where datediff(hh,FSTime,getdate())>24
where (datepart(dw,FSTime))+@@datefirst-1)%7 not in(0,7)
select id,WenHao from GW_LZ
where datediff(day,'1900-01-01',FSTime)%7+1 not in(6,7)
and datediff(hh,FSTime,getdate())>24 select id,WenHao from GW_LZ where datediff(hh,FSTime,getdate())>24
and datediff(hh,FSTime,getdate()) <=120select id,WenHao from GW_LZ where datediff(hh,FSTime,getdate())>24
and ((datepart(dw,FSTime))+@@datefirst-1)%7 not in(0,7)
我的FSTime='2009-1-2 23:52:00'是这个,到现在肯定没超过24小时,今天是周日啊,才过了不到一个小时啊,
可是,我都能吧这条记录查出来啊