Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Is sql dba a good career? : SQL DBA

996


what is column? : Sql dba

1006


what is sp_pkeys? : Transact sql

1162


How do I install sql?

1002


how to do backup entire database? : Transact sql

1148


what are the advantages of using stored procedures? : Sql dba

1105


How do you modify a table in sql?

1129


What are keys in sql?

1004


What is the meaning of disabling a trigger?

1182


What is data type in sql?

967


What are stored procedures used for?

1003


What is difference between table and view?

1063


What is field delimiter?

1049


what is sql? : Sql dba

1030


Explain the uses of database trigger.

1117