일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
- cassandra
- weblogic 10
- docker-compose
- WebLogic
- Netty
- QueryDSL
- MySQL
- KAFKA
- redis
- JPA
- netflix oss
- docker
- Spring Open Feign
- coalesce
- jmeter
- Docker Compose
- argo cd
- docker compose mysql
- mybatis
- Selenium
- ChannelPipeline
- spring cloud
- spring boot redis
- vue.js
- Airflow
- spring boot
- Redis Sentinel
- RabbitMQ
- Hibernate
- grafana
- Today
- Total
IT.FARMER
oracle 10g 이상 WM_CONCAT (여러 row 를 한컬럼에) 본문
1. oracle 10g 이상 WM_CONCAT2. 9i때는 xmlelement 등장
oracle 10g 이상
REPLACE (WM_CONCAT (FIELD_NAME), ',', '$') AS COUNT_MAP,
oracle 9i 이상
REPLACE (substr( xmlagg(xmlelement(nm,',', FIELD_NAME)).extract('//text()'),2), ',', '$') AS COUNT_MAP
oracle 9i 이하 아래 참조.(partition by ,connect by prior 조합.)
http://mycup.tistory.com/entry/SQLORACLE-%EC%97%AC%EB%9F%AC-%ED%96%89%EC%9D%98-%ED%8A%B9%EC%A0%95-%EC%BB%AC%EB%9F%BC%EA%B0%92-%ED%95%98%EB%82%98%EC%9D%98-%EC%BB%AC%EB%9F%BC%EC%9C%BC%EB%A1%9C-%ED%95%A9%EC%B9%98%EA%B8%B0
참고 자료 :
필드가 2개 인경우
SELECT substr(xmlagg(xmlelement(nm,'/',keyword||','||cnt)).extract('//text()'),2)
: field name
partition by ,connect by prior 조합보다 훨씬 좋쿠나.
참고 블로그 : http://impudence99.blog.me/10107940704
http://kin.naver.com/qna/detail.nhn?d1id=1&dirId=10205&docId=130772275&qb=b3JhY2xlIHhtbGVsZW1lbnQ=&enc=utf8§ion=kin&rank=1&search_sort=0&spq=0&pid=gDxMhF5Y7uGssvBON78ssc--221883&sid=TlxNhpEbXE4AABHMeg4
'DataBase > oracle' 카테고리의 다른 글
Oracle standard... table column comment, table comment (0) | 2011.11.03 |
---|---|
Oracle 가로데이터 세로정렬 (0) | 2011.08.02 |
Oracle - DB link (0) | 2011.04.14 |
oracle table space create and user creation (0) | 2011.04.12 |
Oracle User Creation And Authority[유저생성 및 권한] (0) | 2011.02.22 |