表alertlabel
中记录变字段
如何用alertlabel
表得到下面数据
实现的sql语句
sql
select a.AlertID,
(select Value from alertlabel where AlertID=a.AlertID and Label='host') as host,
(select Value from alertlabel where AlertID=a.AlertID and Label='job') as job
from (select AlertID from alertlabel group by AlertID) a;