adspace


.  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 bcp? When does it used? : Sql dba

1065


Is inner join faster than left join?

1287


define sql insert statement ? : Sql dba

1108


What is the best sql course?

1062


Does group by remove duplicates?

1120


what is schema? : Sql dba

1163


how to escape special characters in sql statements? : Sql dba

1124


what are the advantages of sql ? : Sql dba

1153


how to use regular expression in pattern match conditions? : Sql dba

1125


how many tables will create when we create table, what are they? : Sql dba

1154


What is your daily office routine?

2351


If a cursor is open, how can we find in a pl/sql block?

1252


what are all the common sql function? : Sql dba

1141


how to start mysql server? : Sql dba

1279


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2099