日期:2014-05-18 浏览次数:20452 次
elect wcsj,SPSJ,ZGSPSJ,ZJLSPSJ,djbh from IN_GZCLDH where ZF='N' and ZDRQ>='2012-1-1' and ZDRQ<='2012-1-31' and ZJLSP='同意' and )case when WCSJ is not null then DATEDIFF(HOUR,ZJLSPSJ,WCSJ) else DATEDIFF(HOUR,ZJLSPSJ,GETDATE()) end)>24 --加个括号你就能看懂了吧!也就是时间差的返回值大于24