How to add conditions in select statement in oracle?

1 Answer

Answer :

Just add the decode

Related questions

Description : How can I dump an oracle schema to a LOCAL file over a network connection from sqlplus?

Last Answer : By connecting and spooling are you excluding the exp/imp commands (or expdb/impdb in 10g)?

Description : What are the two ways to incorporate images into a oracle forms application?

Last Answer : Boilerplate Images Image_items

Description : How does one start the Oracle Intelligent Agent? (for DBA

Last Answer : One needs to start an OIA (Oracle Intelligent Agent) process on all machines that will to be managed via OEM. For OEM 9i and above:

Description : What is the Oracle Intelligent Agent? (for DBA

Last Answer : The Oracle Intelligent Agent (OIA) is an autonomous process that needs to run on a remote node in the network to make the node OEM manageable. The Oracle Intelligent Agent is ... events registered in Enterprise Manager; and . Executing tasks associated with jobs submitted to Enterprise Manager.

Description : Are there any undocumented commands in Oracle? (for DBA

Last Answer : Sure there are, but it is hard to find them. Look at these examples: From Server Manager (Oracle7.3 and above): ORADEBUG HELP It looks like one can change memory locations with the ORADEBUG POKE ... rdbms/lib/oradbx.o; make -f oracle.mk oradbx) SQL*Plus: ALTER SESSION SET CURRENT_SCHEMA = SYS;

Description : How does one tune Oracle Wait events? (for DBA

Last Answer : Some wait events from V$SESSION_WAIT and V$SYSTEM_EVENT views: Event Name: Tuning Recommendation: db file sequential read Tune SQL to do less I/O. Make sure all objects are analyzed. Redistribute ... SYS.V$BH log buffer spaces Increase LOG_BUFFER parameter or move log files to faster disks

Description : How does one manage Oracle database users? (for DBA

Last Answer : Oracle user accounts can be locked, unlocked, forced to choose new passwords, etc. For example, all accounts except SYS and SYSTEM will be locked after creating an Oracle9iDB database using the DB ... locked users account ALTER USER scott PASSWORD EXPIRE; -- Force user to choose a new password

Description : How does one manage Oracle database users? (for DBA

Last Answer : Oracle user accounts can be locked, unlocked, forced to choose new passwords, etc. For example, all accounts except SYS and SYSTEM will be locked after creating an Oracle9iDB database using the ... from SYS.V$BH log buffer spaces Increase LOG_BUFFER parameter or move log files to faster disks

Description : What tools/utilities does Oracle provide to assist with performance tuning? (for DBA

Last Answer : Oracle provide the following tools/ utilities to assist with performance monitoring and tuning: . TKProf . UTLBSTAT.SQL and UTLESTAT.SQL - Begin and end stats monitoring . Statspack . Oracle Enterprise Manager - Tuning Pack

Description : How do you call other Oracle Products from Oracle Forms?

Last Answer : Run_product is a built-in, Used to invoke one of the supported oracle tools products and specifies the name of the document or module to be run. If the called product is unavailable at the time of the call, Oracle Forms returns a message to the operator.

Description : What strategies are available for backing-up an Oracle database? (for DBA

Last Answer : The following methods are valid for backing-up an Oracle database: Export/Import - Exports are "logical" database backups in that they extract logical definitions and data from the database to a file. ... , etc. If your database is in ARCGIVELOG mode, you also need to backup archived log files.

Description : Where in the Oracle directory tree structure are audit traces placed?

Last Answer : In unix $ORACLE_HOME/rdbms/audit, in Windows the event viewer

Description : When a form is invoked with call_form, Does oracle forms issues a save point?

Last Answer : Yes

Description : Can you connect to non - oracle datasource ? How?

Last Answer : Yes .

Description : what are the datatypes supported By oracle (INTERNAL)?

Last Answer : Varchar2, Number,Char , MLSLABEL.

Description : What are the OOPS concepts in Oracle.

Last Answer : Oracle does implement the OOPS concepts. The best example is the Property Classes. We can categorise the properties by setting the visual attributes and then attach the property classes for the objects ... and classes and we can consider the peroperty classes as classes and the items as objects

Description : How does one switch to another user in Oracle? (for DBA

Last Answer : Users normally use the "connect" statement to connect from one database user to another. However, DBAs can switch from one user to another without a password. Of course it is not advisable to ... tiger Connected. Note: Also see the su.sql script in the Useful Scripts and Sample Programs Page.

Description : How does one change an Oracle user's password?(for DBA

Last Answer : Issue the following SQL command: ALTER USER IDENTIFIED BY ; From Oracle8 you can just type "password" from SQL*Plus, or if you need to change another user's password, type "password ... this example: SQL> password Changing password for SCOTT Old password: New password: Retype new password:

Description : Key Words Used in Oracle

Last Answer : The Key words that are used in Oracle are :: a) Commiting :: A transaction is said to be commited when the transaction makes permanent changes resulting from the SQL statements. b) Rollback :: ... A Process is a 'thread of control' or mechansim in Operating System that executes series of steps.

Description : What is a Transaction in Oracle

Last Answer : A transaction is a Logical unit of work that compromises one or more SQL Statements executed by a single User. According to ANSI, a transaction begins with first executable statment and ends when it is explicitly commited or rolled back.

Description : How many types of Sql Statements are there in Oracle

Last Answer : There are basically 6 types of sql statments.They are a) Data Defination Language(DDL) :: The DDL statments define and maintain objects and drop objects. b) Data Manipulation Language(DML) :: The DML ... e.g:: Using the Sql Statements in languages such as 'C', Open,Fetch, execute and close

Description : What are different Oracle database objects?

Last Answer : TABLES -VIEWS INDEXES -SYNONYMS -SEQUENCES -TABLESPACES etc

Description : What are ORACLE PRECOMPILERS?

Last Answer : Using ORACLE PRECOMPILERS, SQL statements and PL/SQL blocks can be contained inside 3GL programs written in C,C++,COBOL,PASCAL, FORTRAN,PL/1 AND ADA. The Precompilers are known as ... precompiler runtime library.The output must be compiled and linked with this library to creater an executable.

Description : What are the different types of PL/SQL program units that can be defined and stored in ORACLE database ?

Last Answer : Procedures and Functions,Packages and Database Triggers.

Description : What is OEM (Oracle Enterprise Manager)? (for DBA

Last Answer : OEM is a set of systems management tools provided by Oracle Corporation for managing the Oracle environment. It provides tools to monitor the Oracle environment and automate tasks (both one-time and repetitive in nature) to take database administration a step closer to "Lights Out" management.

Description : What is Oracle Label Security? (for DBA

Last Answer : Oracle Label Security (formerly called Trusted Oracle MLS RDBMS) uses the VPD (Virtual Private Database) feature of Oracle8i to implement row level security. Access to rows are restricted according ... , controlled and managed from the Policy Manager, an Enterprise Manager-based GUI utility.

Description : What is the most important module in Oracle Financials? (for DBA

Last Answer : The General Ledger (GL) module is the basis for all other Oracle Financial modules. All other modules provide information to it. If you implement Oracle Financials, you should switch your current GL ... with it first to give your implementation team a chance to be familiar with Oracle Financials.

Description : What is Oracle Financials? (for DBA

Last Answer : Oracle Financials products provide organizations with solutions to a wide range of long- and short-term accounting system issues. Regardless of the size of the business, Oracle Financials can ... Oracle Sales Analysis: Allows for better forecasting, planning. and reporting of sales information.

Description : What are the menu items that oracle forms 4.0 supports?

Last Answer : Plain, Check,Radio, Separator, Magic

Description : Why is Oracle not using the damn index? (for DBA

Last Answer : This problem normally only arises when the query plan is being generated by the Cost Based Optimizer. The usual cause is because the CBO calculates that executing a Full Table Scan would be faster ... with AUTOTRACE to see the statistics. Compare this to the explain plan when not using an index.

Description : What are the different methods of backing up oracle database ?

Last Answer : Logical Backups - Cold Backups - Hot Backups (Archive log)

Description : Where can one get a list of all hidden Oracle parameters? (for DBA

Last Answer : Oracle initialization or INIT.ORA parameters with an underscore in front are hidden or unsupported parameters. One can get a list of all hidden parameters by executing this query: select * from SYS.X$KSPPI ... 1,1)='_' order by a.ksppinm; Remember: Thou shall not play with undocumented parameters!

Description : List the Optional Flexible Architecture (OFA) of Oracle database? or How can we organize the tablespaces in Oracle database to have maximum performance ?

Last Answer : SYSTEM - Data dictionary tables. DATA - Standard operational tables. DATA2- Static tables used for standard operations INDEXES - Indexes for Standard operational tables. INDEXES1 - Indexes of ... - Temporary purpose tablespace TEMP_USER - Temporary tablespace for users. USERS - User tablespace.

Description : Can one import/export between different versions of Oracle? (for DBA

Last Answer : Different versions of the import utility is upwards compatible. This means that one can take an export file created from an old export version, and import it using a later version of the import utility. ... database to allow the Oracle 7.3 exp/imp utilities to run against an Oracle 8 database.

Description : How can values be passed bet. precompiler exits & Oracle call interface?

Last Answer : By using the statement EXECIAFGET & EXECIAFPUT.

Description : What third party tools can be used with Oracle EBU/ RMAN? (for DBA

Last Answer : The following Media Management Software Vendors have integrated their media management software packages with Oracle Recovery Manager and Oracle7 Enterprise Backup Utility. The Media Management ... and Recovery Sterling Software's SAMS:Alexandria - formerly from Spectralogic Sun Solstice Backup

Description : What are different types of modules available in oracle form?

Last Answer : Form module - a collection of objects and code routines Menu modules - a collection of menus and menu item commands that together make up an application menu library module - a collection of user named procedures, functions and packages that can be called from other modules in the application

Description : What is the difference between object embedding & linking in Oracle forms?

Last Answer : In Oracle forms, Embedded objects become part of the form module, and linked objects are references from a form module to a linked source file.

Description : Does Oracle write to data files in begin/hot backup mode? (for DBA

Last Answer : Oracle will stop updating file headers, but will continue to write data to the database files even if a tablespace is in backup mode.In backup mode, Oracle will write out complete changed blocks ... ). Because of this, one should notice increased log activity and archiving during on-line backups.

Description : What are the different file extensions that are created by oracle reports?

Last Answer : Rep file and Rdf file.

Description : What is user Account in Oracle database?

Last Answer : A user account is not a physical structure in database but it is having important relationship to the objects in the database and will be having certain privileges.

Description : What is the mechanism provided by ORACLE for table replication ?

Last Answer : Snapshots and SNAPSHOT LOGs

Description : What is user Account in Oracle database?

Last Answer : An user account is not a physical structure in Database but it is having important relationship to the objects in the database and will be having certain privileges.

Description : What is an Index ? How it is implemented in Oracle Database ?

Last Answer : An index is a database structure used by the server to have direct access of a row in a table. An index is automatically created when a unique of primary key constraint clause is specified in create table comman (Ver 7.0)

Description : What are the basic element of Base configuration of an oracle Database ?

Last Answer : It consists of one or more data files. one or more control files. two or more redo log files. The Database contains multiple users/schemas one or more rollback segments one or more tablespaces ... (Data Base Write) ARCH (ARCHiver) CKPT (Check Point) RECO Dispatcher User Process with associated PGS

Description : What is an Oracle index?

Last Answer : An index is an optional structure associated with a table to have direct access to rows, which can be created to increase the performance of data retrieval. Index can be created on one or more columns of a table.

Description : What is an Oracle sequence?

Last Answer : A sequence generates a serial list of unique numbers for numerical columns of a database's tables.

Description : What is an Oracle view?

Last Answer : A view is a virtual table. Every view has a query attached to it. (The query is a SELECT statement that identifies the columns and rows of the table(s) the view uses.)

Description : What is Oracle table?

Last Answer : A table is the basic unit of data storage in an Oracle database. The tables of a database hold all of the user accessible data. Table data is stored in rows and columns.

Description : What are the components of logical database structure of Oracle database?

Last Answer : There are tablespaces and database's schema objects.