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

hi friends,
I have a table A
col as
status|NUM
and value as
open |1
open |2
close |3
close |3
the O/P should be
open|close
1 |3
2 |4

Answer Posted / ajit

select decode ( status, 'open', num ) open,
decode ( status, 'close', num ) close
from A;

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I find my oracle client driver version?

972


Explain about functional dependency and its relation with table design?

954


What are the benefits of ordbms?

1024


How many file formats are supported to export data?

1139


master table and child table performances and comparisons in Oracle ?

2071


How to pass a parameter to a cursor in oracle?

1106


Is oracle an open source?

1021


How to start a specific oracle instance?

991


What do you understand by a database object? Can you list a few of them?

971


How to define a cusotmer as a supplier in ORACLE R12

2170


How do I limit the number of rows returned by an oracle query after ordering?

1101


interview questions with answer for cts

2534


How to test null values?

1044


What does sharding mean?

946


How to insert a new row into a table in oracle?

1096