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
How do you bind variables in pl sql?
What is using in sql?
What is cursor and why it is required?
Is drop table faster than truncate?
what are the 'mysql' command line options? : Sql dba
What is foreign key in sql with example?
What is a pragma statement?
explain the delete statements in sql
Can we insert data into view?
How many indexes can be created on a table in sql?
is it possible to pass an object or table to a procedure as an argument?
How do I run a sql trace?
How to select random rows from a table?
What is cursor explain with example?
what is the difference between delete and truncate statement in sql? : Sql dba