Tag Archives: sql

Oracle Reports (Report 6i) – Technical – Interview – Question Answers Question: How many types of columns are there and what are they Formula columns: For doing mathematical calculations and returning one value Summary Columns: For doing summary calculations such … Continue reading

Friends, here some of quite useful regular sql queries in oracle applications. Query 1: Select responsibility name along with application name SELECT application_short_name , frt.responsibility_id, frt.responsibility_name FROM apps.fnd_responsibility_tl frt , fnd_application fa WHERE fa.application_id = frt.application_id;   Query 2: Get … Continue reading

    Question: What are the Pct Free and Pct Used Answer:  Pct Free is used to denote the percentage of the free space that is to be left when creating a table. Similarly Pct Used is used to denote … Continue reading

How to insert & character or special character into Database using SQL*Plus.

Solution 1:

If you are not using substitution variables (&1 &2 &3 etc.) you can do a “SET DEFINE OFF” or “SET SCAN OFF” to turn off the definition of the ampersand as a substitution variable.

 Example:
SQL> SET DEFINE OFF
SQL> INSERT INTO <table_name> VALUES (‘AT&T’);
1 row created

Solution 2:
If you are using substitution variables, set the substitution character to one which will not be encountered when inserting data.
Example:
SQL> SET DEFINE %
SQL> INSERT INTO <temp_table> VALUES (‘AT&T’)
/
1 row created.

Solution 3:
If you precede the special character with a backslash and the ESCAPE setting in SQL*Plus is set to ON, then SQL*Plus will understand the special character following the escape symbol is to be treated as a regular character.
Example:
SQL>set escape on
SQL>show escape
escape “\” (hex 5c)
SQL> INSERT INTO temp_table VALUES (‘select * from emp where ename = \&
1′);
1 row created.

Here there are very basic still sometime become critical to know concept if you working in Oracle Database related activities.  Q: What is an Oracle instance?Every running Oracle database is associated with an Oracle instance. When adatabase is started on … Continue reading

  Oracle Technical Interview Questions and Answers : SQL based questions   1. To see current user name Sql> show user; 2. Change SQL prompt name SQL> set sqlprompt “Start > “ Start >   3. Switch to DOS prompt … Continue reading

Discoverer SQL: Long Running Discoverer Report Here is a small SQL quite useful to work with discoverer to identify long running reports and start looking into the reason / troubleshooting. SELECT q.qs_doc_name Worksheet,  q.qs_doc_details Sheet ,  q.qs_num_rows Lines,  QS_ACT_CPU_TIME CPU_Time, … Continue reading