. 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
table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
What are predefined functions in sql?
What is data manipulation language?
How does stored procedure reduce network traffic?
How do I view a sql database?
How do I run a sql query?
What is the purpose of primary key?
How can one get sql*loader to commit only at the end of the load file? : aql loader
Why we use join in sql?
Can delete statement be rollbacked?
what are set operators in sql? : Sql dba
What is sql injection vulnerability?
What is trigger types in sql?
what is the syntax for using sql_variant_property? : Transact sql
What is the best partition size for windows 10?