【发布时间】:2014-08-25 05:55:42
【问题描述】:
我有一个如下所示的订单备注表:
ORDER NOTE
10000 some notes
10000 another note
20000 a new note
30000 note 1
30000 note 2
我想汇总每个订单一行,然后是所有相关注释,如下所示:
ORDER NOTES
10000 some notes, another note
20000 a new note
30000 note 1, note 2
有SQL语句可以帮到我吗?
修订---
数据库是 IBM db/2,但如果存在的话,更喜欢 SQL ANSI 解决方案。
【问题讨论】:
-
This question 谈到了使用 db2 的相同问题。
标签: sql db2 concatenation aggregate-functions