专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > 企业开发

biztalk 中如若作group by

发布时间:2010-06-06 16:57:55 文章来源:www.iduyao.cn 采编人员:星星草
biztalk 中如果作group by
原文件
customer1,order1,10
customer1,order2,30

目标文件
customer1,40

原文件2行记录,新文件1行记录,并对数量作累加(10+30=40)。

mapping的时候要用哪个FUNCTIONID,或者怎么设置。

多谢
------解决方案--------------------
把你FF变成的xml文档
<xml>
<x customer="customer1" order="order1" n="10"/>
<x customer="customer1" order="order2" n="30"/>
</xml>
xslt文件:
  <xsl:for-each-group select="xml/x" group-by="@customer">
    <tr>
      <td><xsl:value-of select="@customer"/></td>
      <td>
        <xsl:value-of select="current-group()/@order" separator=", "/>
      </td>
      <td><xsl:value-of select="sum(current-group()/@n)"/></td>
    </tr>
  </xsl:for-each-group>
结果:
<table>
   <tr>
      <th>customer1</th>
      <th>order1,order2</th>
      <th>40</th>
   </tr>
</table>
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: