. 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 / phanikumar kode
select cust,listagg(acc,' ') within group(order by acc) from tbl group by cust;
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Can there be 2 primary keys in a table?
What is difference between ms sql and mysql?
Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
What is int identity in sql?
Differentiate between % rowtype and type record.
what is an alias command? : Sql dba
What are different functions in sql?
explain mysql aggregate functions. : Sql dba
what is auto increment? : Sql dba
What are the two types of exceptions in pl/sql?
what tools available for managing mysql server? : Sql dba
What is record in pl sql?
What is attribute indicator in pl sql?
What is record data type?
Explain what is an index?