Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Multiple Rows Into One Column Field

shagar mahabubjanAug 7 2013 — edited Oct 6 2013

Hi All,

       Today I tried one query:

select wm_concat(ename) from emp

group by deptno;

I have a data that looks like this.


CLARK,KING,MILLER,SREE

JONES,FORD,ADAMS,SCOTT

ALLEN,MARTIN,BLAKE,TURNER,JAMES,WARD

Can someone help me to build an SQL command that would have the output as follows:

I need per column 3 values....


CLARK,KING,MILLER,

SREE,JONES,FORD,

ADAMS,SCOTT,ALLEN,

MARTIN,BLAKE,TURNER,

JAMES,WARD

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 3 2013
Added on Aug 7 2013
30 comments
26,719 views