日期:2014-05-20 浏览次数:20788 次
select newA.ID,b.PointName,newA.RecordTime ,newA.PointValue from (select ID,max(recordTime),pointvalue from A group by ID,value) as new A,B where newA.ID = b.ID
------解决方案--------------------
select newA.ID,b.PointName,newA.RecordTime ,newA.PointValue from (select ID,max(recordTime),pointvalue from A group by ID,pointvalue) as newA,B where newA.ID = b.ID
------解决方案--------------------
要每个设备的最后一次时间吧
对时间max,上面的没有测试,我想应该可以实现
------解决方案--------------------
关于sql 语句的生成可使用视图来生成,那样是最简单