select A.*,B.*, case when A.f_audio_finish is null then DATEDIFF(n,GETDATE(),DATEADD(n,B.testBatch,A.f_rk_time)) when B.testBatch< DATEDIFF(N,A.f_rk_time,A.f_audio_finish) then DATEDIFF(N,A.f_audio_finish,A.f_rk_time) else null end as csdjs from Internal_Application_BC(nolock) A left join (select *,(CAST(isnull(station,'') as varchar(20))+' '+CAST(isnull(project,'') as varchar(20))) a from watch_BC_ORTsetting(nolock)) B on A.f_test_item = B.a 问题点如下: DATEDIFF(n,GETDATE(),DATEADD(n,B.testBatch,A.f_rk_time)) 为什么在页面上这个条件下显示的结果是静态的,按理说我这里的计算有用到GETDATE(),在页面上结果应该是动态的才对啊 |