oracle-function-wm_concat
来源:互联网 发布:淘宝 盗图 申诉 编辑:程序博客网 时间:2024/06/07 02:55
转自:http://database.51cto.com/art/201010/231126.htm
表结构:
create table SHOPPING
(
u_id NUMBER,
goods VARCHAR2(30),
num NUMBER(10,2)
)
原数据:
select * from shopping;
1 苹果 2.00
2 香梨 5.00
1 西瓜 4.00
3 葡萄 1.00
3 香蕉 1.00
1 橘子 3.00
期望结果一:
1 苹果,橘子,西瓜
2 香梨
3 葡萄,香蕉
查询语句:
select u_id, wmsys.wm_concat(goods) goods_list
from shopping
group by u_id;
期望结果二:
1 苹果(2斤),橘子(3斤),西瓜(4斤)
2 香梨(5斤)
3 葡萄(1斤),香蕉(1斤)
查询语句:
select u_id, wmsys.wm_concat(goods || '(' || num || '斤)' ) goods_sum
from shopping
group by u_id;
0 0
- oracle-function-wm_concat
- oracle wm_concat
- oracle wm_concat
- ORACLE wm_concat
- oracle wmsys.wm_concat函数
- oracle的wm_concat函数
- oracle wmsys.wm_concat用法
- oracle之wmsys.wm_concat
- oracle wm_concat函数
- Oracle中的wmsys.wm_concat
- oracle wm_concat(column)函数
- oracle wm_concat (column) 用法
- Oracle中的wmsys.wm_concat
- Oracle中的wmsys.wm_concat
- Oracle中的wmsys.wm_concat
- oracle xe 添加 wm_concat
- oracle 行转列 listagg wm_concat
- oracle wm_concat 函数 学习
- java实现压缩、解压缩的常见问题Memo
- MongoProperties
- ScrollView中嵌套ListView分析
- 周日
- PIC单片机DS18B20温度报警程序及仿真
- oracle-function-wm_concat
- 第七周,周总结
- 归并排序
- 计算机C语言的介绍
- 关于C指针用法的体会和感受
- IOS圆形头像的设置
- iOS GDataXMLNode 解析XML DOM方式 总结
- C#读写(OFFICE 2013)excel表格(续)
- VS2010 简单ATL COM开发(上)