标签:
Select Ana1,RdDate,RdTime,cast(convert(varchar,RdDate,112)+' '+convert(varchar,RdTime,108) as datetime) as time,t.interval FROM (SELECT Ana1,RdDate,RdTime, datediff (mi,cast(convert(varchar,RdDate,112)+' '+convert(varchar,RdTime,108) as datetime), GETDATE()) AS interval FROM Records ) AS t WHERE t.interval%10 = 0 //获取间隔十分钟的数据,但是获取之后分钟相同的还会有重复,仍需进一步处理
标签:
原文地址:http://blog.csdn.net/wj512416359/article/details/43405449