DB2多行转一行【XML方式】
–DB2多行转一行【XML方式】–分组然后合并,然后去除XML标签SELECT replace(replace(replace(xml2clob(xmlagg(xmlelement(name A, 【字段】))),’’, ‘【分隔符】’),’’,’’),’’,’’)from 【表】group by 【分组字段】–示例SELECT hy.HYDH,hy.HYMC,replace(replace(replace(xml2clob(xmlagg(xmlelement(name A,jg.JGMC))
原创
2021-10-20 18:25:22 ·
1183 阅读 ·
1 评论