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!

without using listagg function

User_G2BGVJul 14 2014 — edited Jul 15 2014

Hi Sir,

Today my mgr asked me to write a sql query to display comma separated values with out using listagg, sys_connect_by_path, wm_concat ?

I said we can write only with cursor .. without oracle predefined functions? is it correct ? or any advise on this?

Please help me

Regards

Ar

SQL> create table samp(deptno number(2),ename varchar2(2));

Table created

SQL> insert all
  2  into samp (deptno,ename) values (10,'A')
  3  into samp (deptno,ename) values (20,'D')
  4  into samp (deptno,ename) values (20,'E')
  5  SELECT * FROM DUAL;

3 rows inserted

SQL> SELECT * FROM SAMP;

DEPTNO ENAME
------ -----
    10 A
    20 D
    20 E

Need display like this

10 A

20 D,E

This post has been answered by padders on Jul 14 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 12 2014
Added on Jul 14 2014
6 comments
3,061 views