sql查询



select seri, max(case when insunit='℃' then hvalue end) as tvalue,max(case when insunit='%' then hvalue end) as hvalue from (SELECT substring(insname,1,(CHARINDEX('#',insname)-1)) as seri,insunit,hvalue  from JfDevIns where devid=56 and insunit is not null )as tb group by seri




版权声明:本文为lovemuchcode原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。