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

how can db_files > maxdatafiles since db_files is for instance and the later is for database

0 Answers   CTS,


What is backup in Oracle?

0 Answers   MCN Solutions,


What is Java Pool in Oracle?

0 Answers   MCN Solutions,


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.

0 Answers  


Explain the use of parfile option in exp command.

0 Answers  






How to view existing locks on the database?

0 Answers  


How to store only time; not date and time?

0 Answers  


i want department wise maxmum salary and empolyee name

9 Answers  


How to estimate disk space needed for an export job?

0 Answers  


what is the syntax of INSERT command?

7 Answers  


Is truncate autocommit in oracle?

0 Answers  


ABOUT IDENTITY?

0 Answers   HCL,


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)