标签:oba bsp images inf where image span template repo
select b.templateId,GROUP_CONCAT(c.id),a.executeResult
from vrv_paw_rulestatus a, vrv_paw_terminaltobaselinereport b, vrv_paw_rule c, vrv_paw_template_rule d
where a.terOnlyId = b.terminalInfoId and b.templateId = d.templateId and d.ruleOnlyId = c.id
GROUP BY b.templateId,a.executeResult
原来的数据:
select b.templateId,c.id,a.executeResult from vrv_paw_rulestatus a, vrv_paw_terminaltobaselinereport b, vrv_paw_rule c, vrv_paw_template_rule d
where a.terOnlyId = b.terminalInfoId and b.templateId = d.templateId and d.ruleOnlyId = c.id
与我需要的数据不一样
加group by只加一个:id不全,丢失了;executeResult也丢失了
select b.templateId,c.id,a.executeResult from vrv_paw_rulestatus a, vrv_paw_terminaltobaselinereport b, vrv_paw_rule c, vrv_paw_template_rule d
where a.terOnlyId = b.terminalInfoId and b.templateId = d.templateId and d.ruleOnlyId = c.id
GROUP BY b.templateId
标签:oba bsp images inf where image span template repo
原文地址:http://www.cnblogs.com/goloving/p/7815144.html