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

What is the string concatenation operator in oracle?

1230


Can you drop an index associated with a unique or primary key constraint?

1069


What are the various constraints used in oracle?

1096


What is the exact use of Collections?

2190


What is a subquery in oracle?

1166


How to create an oracle database?

1102


What is the recommended interval at which to run statspack snapshots, and why?

2962


Explain a private synonyms?

1097


what is partitioning? Types of partitioning. explain? what is the new kind of partitioning type introduced in 9i?

2318


What are the limitations of check constraint?

1075


What are the common oracle dba tasks?

1201


Explain a synonym?

1088


Explain parameter file in oracle.

1081


What is different types of joins?

1078


How can we force the database to use the user specified rollback segment?

1200