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...

.  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


Please Help Members By Posting Answers For Below Questions

Explain clause in sql?

1036


How do I edit a stored procedure?

1002


How do you rename a table in sql?

1123


Why partition by is used in sql?

1048


When can we use the where clause and the having clause?

1029


Write a program that shows the usage of while loop to calculate the average of user entered numbers and entry of more numbers are stopped by entering number 0?

2287


What are the different types of joins in sql?

1813


Which constraints we can use while creating database in sql?

1092


What does plv msg allows you to do?

1152


What is the difference between syntax error and runtime error?

1148


What are the disadvantages of file system?

1272


Why is nosql good?

1036


Is it mandatory for the primary key to be given a value when a new record is inserted?

1206


What is sql catalog?

1029


Is left join faster than inner join?

1133