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 / barun

select decode(cust,'a',acc) as A ,decode(cust,'b',acc) as B,decode(cust,'c',acc) AS C from customer

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of double ampersand (&&) in sql queries? Give an example

1139


what is the difference between inner and outer join? Explain with example. : Sql dba

1025


How can I delete duplicate rows?

1012


What is the difference between joins?

1039


what is msql? : Sql dba

988


How to return multiple rows from the stored procedure?

970


How do I create an index in word?

1029


What is the use of non clustered index?

994


How can you view the errors encountered in a trigger?

960


Why do we use cursors?

986


Is sql a microsoft product?

951


What is difference between sql function and stored procedure?

1002


What is the unique index?

1052


What are the different dml commands in sql?

1170


How many joins can you have in sql?

937