开发者

Calculate open hours

I am using a SQL query

select 
    datediff(hour, Convert(DateTime, Convert(DateTime, Convert(nVarChar, cast(complaintdate as datetime), 101)) + '' +  
            开发者_运维问答 Convert(varchar, complainttime, 114)), dateadd(mi, 330, GETUTCDATE())) 
from complaintregister

it creates results like:

No column name
  15455
  15259
  15190
  15190
  15165
   300
   200
  1000
   500

and I want the colum only containg values > 1000


I agree with Jon Skeet's comment, but to answer your question, surely you only need to add a where clause: "where [Open Hours] > 500"?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜