. 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.
CUST ACC
a dv
b fg
b bh
c mk
c cl
c so
result:-
A B c
dv fg mk
bh cl
so
Answer Posted / ramaraju
select cust,listagg(acc,'|') within group(order by acc) from t2 group by cust;
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is pl sql better than sql?
how many groups of data types? : Sql dba
When should I use nosql database?
Can a key be both primary and foreign?
Why is sharding used?
When is a declare statement required?
Define commit?
How to write pl sql program in mysql command prompt?
What is a database trigger?
what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba
What is primary key secondary key alternate key candidate key?
Explain what is a database?
how can we optimize or increase the speed of a mysql select query? : Sql dba
Can we use commit inside a trigger?
What are the constraints available in sql?