. 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
How do you modify a column in sql?
Can I join the same table twice?
What is db journal file?
explain the difference between delete , truncate and drop commands? : Sql dba
What is relationship? How many types of relationship are there?
How does sql developer connect to oracle database?
what is the difference between blob and text? : Sql dba
what is bcp? When does it used? : Sql dba
What are user defined functions?
What are the key differences between SQL and PL SQL?
What is the difference between left and left outer join?
What is error ora-12154: tns:could not resolve the connect identifier specified?
What is not in sql?
explain the delete statements in sql
Can we call a function containing dml statements in a select query?