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



hi friends, I have a table A col as status|NUM and value as open |1 open |2 close |3 clo..

Answer / 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

More Oracle General Interview Questions

which is best insttute for teradata,sybase,mysql,oracle in hyderabad

1 Answers  


Describe the types of sub query?

0 Answers  


How are Indexes Update ?

1 Answers  


How does one get the view definition of fixed views/tables?

0 Answers  


sql query to get zero records from a table

7 Answers   CTS,






What view(s) do you use to associate a users SQLPLUS session with his o/s process?

0 Answers  


How to synchronize 2 schema's objects?

0 Answers   Virtusa,


What to do if dba lost the system password?

0 Answers  


I have some query regarding Report generation from Oracle Apps "PO module". I have to generate a report where table columns are as below: Vendor_name Invoice No PO Number Item_Quantity Value of Goods Date of Shipping Name_of_the_transport Date_of_receipt_issued. Now my questions is :from which table/column I can get the information of "Name_of_the_transport" column. Thanks in advance.

0 Answers  


what is a view?

7 Answers  


When do I need to use a semicolon vs a slash in oracle sql?

0 Answers  


What is Read-Only Transaction ?

3 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)