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

Which is better Oracle or MS SQL? Why?

5419


How to define a variable of a specific record type?

599


what are steps for interface? where is exchange rate defined in which table?

1479


How a tablespace is related to data files?

573


How to fetch the row which has the max value for a column?

530






How to speed up webrick?

582


What is literal?

578


What are the oracle built-in data types?

553


How to compare dates in oracle sql?

646


How to connect the oracle server as sysdba?

621


material view and view disadvantages?

624


Explain enable novalidate constraint.

591


Please send me Informatica 8.1 certification dumps, my mail id mona85gupta@gmail.com

1432


What are the four Oracle system processes that must always be up and running for the database to be useable?

583


What to do if the binary spfile is wrong for the default instance?

553