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 are the restrictions on external table columns?

1055


What is a lookup table in oracle?

974


What is the difference between $oracle_base and $oracle_home?

1091


What is an oracle database?

1048


What is dynamic proxy?

1012


What is enter substitution variable in oracle?

1058


Explain about functional dependency and its relation with table design?

1018


What is the difference between pre-select and pre-query?

1226


why should i declare foreign key constraint as self relation instead of binary relation in tables ?

2050


Explain about your project and its relation to the current job position you are applying to?

1011


What is the data type of dual table?

997


How to pass parameters to procedures in oracle?

1043


How to experiment a data lock in oracle?

1060


What is Data Dictionary Cache in Oracle?

1169


How to retrieve data from an explicit cursor?

1064