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 ADDM Advisor in Oracle?

1158


How to update values in a table in oracle?

1001


when we are importing items in inventory, showing errors, Oracle support suggested us for running scripts & also suggested if we run scripts, iprocurement applicaation if is there it will show shared and if we go in future for iprocurement, it wont work. So kinldy suggest any functional solution.

1983


What privilege is needed for a user to create views in oracle?

1024


Explain the use of indexes option in exp command.

1121


What is the Tune Query

2269


How to call a stored function with parameters?

1011


How to shutdown your 10g xe server from command line?

1067


Explain about functional dependency and its relation with table design?

992


What is SQL access advisor in Oracle?

1178


What is the best way to do multi-row insert in oracle?

1049


I just want to maintain data like an employee can belongs to 3 or more departments . We can resolve this by using composite key but it avoids normalization rules. So Can anyone tell me how can I maintain data.

2171


How can we find out the current date and time in oracle?

1079


When do you get a .pll extension in oracle? Explain its importance

1017


Please explain joins in oracle?

1049