I have a tablle like this:
cust acc
-----------
a 1
b 2
b 3
c 4
c 5
c 6
I Want below o/p:
cust acc
---------------
a 1
b 2|3
c 4|5|6
Please any one can you have any ideas share me.
I have urgent requirement.
Answer Posted / dinesh
select cust, listagg(acc,'|') WITHIN GROUP (ORDER BY ACC )as ACC from cust1 group by cust;
This LISTAGG Function is the concept of 11g release2. and
this is the best answer for this question.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is sql dba a good career? : SQL DBA
what is column? : Sql dba
what is sp_pkeys? : Transact sql
How do I install sql?
how to do backup entire database? : Transact sql
what are the advantages of using stored procedures? : Sql dba
How do you modify a table in sql?
What are keys in sql?
What is the meaning of disabling a trigger?
What is data type in sql?
What are stored procedures used for?
What is difference between table and view?
What is field delimiter?
what is sql? : Sql dba
Explain the uses of database trigger.