Latest Jobs :

Latest Off-Campus Selections

Jobs for 2012 Passouts

Oracle Reports Builder Questions & Answers

Thursday, March 29, 2012


What are the different types of reports?
●    Tabular
●    Master Detail Reports
●    Form Reports
●    Form Letter Reports
●    Mailing Labels Reports
●    Matrix Reports

What are Anchors in reports builder?
An anchor defines the actual position of an object. Anchors are used to determine the vertical and horizontal positioning of a child object relative to its parent.


What are the different types of anchors in Reports?
A There are two types of anchors in Oracle Reports:
●    Implicit (Creates when a report will run)
●    Explicit (Anchors you create)

What are different types of report triggers also define their order of firing ?
There are five reports trigger with order:
1-Before Parameter Form
2-After Parameter Form
3-Before Report
4-Between Pages
5-After Report


Before Form Trigger:
It will Fires before the Run time Parameter Form that will displayed on screen. By using this trigger you can change the value of the parameters.


After Form Trigger:
Fires after the Run time Parameter Form is displayed. From this trigger, you can access parameters and check their values. This trigger can also be used to change parameter values or, if an error occurs, return to the Runtime Parameter Form.


Before Report Trigger:
It will Fires before the report is executed but after queries are parsed and data is fetched.


Between Pages Trigger:
Fires before each page of the report is formatted, except the very first page. This trigger can be used for customized page formatting. (Note : In the Previewer, this trigger only fires the first time that you go to a page. If you subsequently return to the page, the trigger does not fire again.)


After Report Trigger:
Fires after you exit the Previewer, or after report output is sent to a specified destination, such as a file, a printer, or an Oracle*Mail userid. This trigger can be used to clean up any initial processing that was done, such as deleting tables. Note, however, that this trigger always fires, whether or not your report completed successfully.

Format Triggers :
Format Triggers are PL/SQL functions executed before the object is formatted. The trigger can be used to dynamically change the formatting attributes of the object.

What are Placeholder Columns ?
A placeholder is a logical column for which you can conditionally set the datatype and value via PL/SQL or a user exit. Placeholder columns are useful when you want to selectively populate a column with a value.


What are the different page layout sections in Oracle Reports ?
A report has three main sections:
1-Report header pages
2-Report body/margin pages
3-Report trailer pages


What are different types of parameters?
There are two types of parameters:
1-System Parameters
2-User defined (bind and lexical) parameters


What is the difference between Bind and Lexical parameter?
1-Bind parameters are used to replace a single value in SQL or PL/SQL, such as a character string, number, or date.
2-Lexical parameters are placeholders for text that you embed in a SELECT statement. Use Lexical reference when you want the parameter to substitute multiple values at runtime. You can use lexical references to replace the clauses appearing after SELECT, FROM, WHERE, GROUP BY, ORDER BY, HAVING, CONNECT BY, and START WITH.


Define different types of Matrix report ?
1-Single query
2-Multi query
3-Nested Query
4-Matrix Break


What is ‘page protect’ property in report builder?
Page protect property for an object indicates whether to try to keep the entire object and its contents on the same logical page. Checking Page Protect means that if the contents of the object cannot fit on the current logical page, the object and all of its contents will be moved to the next logical page.


What is the ‘Print Condition Type’ property?
‘Print Condition Type’ property specifies the frequency with which you want the object to appear in the report. The Print Condition Type options indicate the logical page(s) on which the object should be triggered to print with regard to the Print Condition Object.


What are the various values of the ‘Print Condition Type’ property in Reports ?
The various values are :
1-All:
All means the object and all of its contents will be printed on all logical pages of the Print Condition Object. The object will be repeated on any overflow pages of the Print Condition Object and will be truncated at the logical page boundary, if necessary.
2-All but First:
All but First means the object and all of its contents will be printed on all logical pages of the Print Condition Object except the first logical page. The object will be formatted only on overflow pages of the Print Condition Object and will be truncated at the logical page boundary, if necessary.
3-All but Last:
All but Last means the object and all of its contents will be printed on all logical pages of the Print Condition Object except the last logical page. The object will be repeated on any overflow pages of the Print Condition Object except the last one and will be truncated at the logical page boundary, if necessary.
4-Default:
Default means that Oracle Reports will use object positioning to set the Print Condition Type to either *First or *Last for you.
5-First:
First means that the object and all of its contents will only be printed on the first logical page of the Print Condition Object. The object will be formatted and will overflow to subsequent pages, if necessary.
6-Last:
Last means that the object and all of its contents will only be printed on the last logical page of the Print Condition Object. The object will be formatted after the Print Condition Object and will overflow to subsequent pages, if necessary.


What is the difference when Flex mode is mode “ON” & when it is “OFF”?
When we set flex mode is ON then reports automatically resizes the parent when the child is resized.


What is the difference when confine mode is “ON” and when it is “OFF”?
When we set confine mode is “ON” thenobject cannot be moved outside its parent in the report layout.


What is the minimum number of groups that is required in matrix report?
Four groups are required for a matrix reports.


What is the lock option in reports layout in oracle reports builder?
when we set lock option we cannot move the fields in the layout editor outside the frame. This is very useful for maintaining the fields.


What are different types of column in reports?
There are 3 types of columns in the reports builder:
1-Placeholder Column
2-Formula Column
3-Summary Column


SQL,PL/SQL Interview Questions part-3


What is SQL sequence and what are their attributes?
Sequence is an Oracle object that is using for generating the sequence of number. IT=T is normally using for column that have primary key.
“CREATE SEQUENCE TRANS_ID_SEQ
START WITH 1
MAXVALUE 99999999
MINVALUE 1
NOCYCLE
NOCACHE
NOORDER”

What is CYCLE AND NO CYCLE in sequence?
When we use “CYCLE” option in sequence and sequence reaches its MAXVALUE, it will start again from the MINVALUE. That is not good when we are using the sequence for primary key. In “NOCYCLE” option cursor did not start from minimum value again.

Can we design one view on another view?
Yes we can design one view on the other view.

What are aggregate functions in Oracle?
Aggregate function are using in oracle with group by clause and with having clause. Avg, count, max, min, sum,

How can we sort out our data in oracle?
We can sort out or data in oracle by using Order by clause. If we sort our data then we use this Order by Roll_Num AEC and fro descending order we will use Order by Roll_Num Desc.

What is a PL/SQL package and what are the advantages of PL/SQL Packages?
A package is a collection of PL/SQL elements that are grouped together within a special BEGIN-END syntax. A package is a schema object that groups logically related PL/SQL types, items, and subprograms.
Packages usually have two parts, a specification and a body, although sometimes the body is unnecessary. The specification (spec for short) is the interface to your applications; it declares the types, variables, constants, exceptions, cursors, and subprograms available for use. The body fully defines cursors and subprograms, and so implements the spec.

What are the query and how many types of queries?
A database query is some type of syntax that is sent to database and get some data or information from the database. It is some type of communicator that is using for giving something and taking something from database.
●    Simple Query
●    Advanced Query
●    Saved Query
●    Cross-project Query

What is the union, intersect and minus operation in oracle?
Create table MY_A
(
My_ID number
)
Table A values: (1, 2, 3)
Create table MY_B
(
My_ID number
)
Table A values: (1, 2, 5)
For UNION:
Select MY_ID from MY_A;
UNION
Select MY_ID from MY_B;
Result: 1, 2, 3,5
For INTERSECT:
Select MY_ID from MY_A;
INTERSECT
Select MY_ID from MY_B;
Result: 1, 2
For MINUS:
Select MY_ID from MY_A;
MINUS
Select MY_ID from MY_B;
Result: 3

What is the difference between UNION and UNION ALL?
In UNION if two rows will match then result come only of two rows but if we use UNION ALL then result will be four rows.
Create table MY_A
(
My_ID number
)
Table A values: (1, 2, 3)
Create table MY_B
(
My_ID number
)
Table B values: (1, 2, 5)
For UNION:
Select MY_ID from MY_A;
UNION
Select MY_ID from MY_B;
Result: 1, 2, 3,5
For UNION ALL:
Select MY_ID from MY_A;
UNION ALL
Select MY_ID from MY_B;
Result: 1,1, 2,2, 3,5

Explain in detail use of OCI in oracle?
OCI is an API that provides functions you can use to access the database server and control SQL execution. OCI supports the data types, calling conventions, syntax, and semantics of the C and C++ programming languages. You compile and link an OCI program much as you would any C or C++ program.

Oracle function can take OUT parameter?
Yes we use OUT parameter in function.

In form Parameter can we define default value?
Yes you can define initial value in form parameter.

What is the difference between NO_DATA_FOUND and %NOTFOUND?
“NO_DATA_FOUND” is a system defined exception. It is generated when no record found in implicit cursor. “%NOTFOUND” is used in cursor. If cursor returns no row then %NOTFOUND returns true and if returns row then %NOTFOUND is false.

Write a statement to find out the no. of rows in oracle?
Select count(*) from emp;

Which function is use for display the numeric figure in words?
SELECT TO_CHAR(TO_DATE(123,'J'),'JSP') to_words FROM   dual;

What is the difference between WHERE clause and HAVING clause?
WHERE clause use in simple select statement on the other hand HAVING clause use in group function statement like.
Select emp_name from WHEER dept_code=123;
Select emp_name from emp HAVING count(emp_cod) > 2;

Write a difference between SUBSTR and INSTR function?
SUBSTR provide some portion of string like from one word to 5th word and INSTR gives us location of that particular word.

SQL,PL/SQL Interview Questions part-2

What is Pseudo column?
Pseudo columns are database columns that are using for different purposes in oracle database like ROWNUM, ROWID, SYSDATE, UID, USER, ORA_ROWSCN, SYSTIMESTAMP,

What is Dual and where it can be use?
Dual is a database table owner is sys and reside in data dictionary. It have only one column name DUMMY and one data X. It is normally use for select the values of Pseudo columns.

Can we insert, update, delete, alter and drop DUAL table?
Yes we can Insert, update, delete alter and also drop Dual table in oracle.

If we create a table with name DUAL it can be work same as DUAL?
Yes we create table with same name of DUAL and also it will work like same of dual table.

What are group functions and how many types of group function?
Group functions return the single result on based on many rows. Like count, sum, min, max, avg first, last these functions return one row result based on many rows.

What are cursors and how many types of cursors?
Cursor is a pointer variable in a memory and use for DML operations. Cursor basically is a private SQL memory area it is also use to improve the performance of the database.
There are two types of cursors.
1- Implicit cursor
2- Explicit cursor
Implicit cursor use oracles to manipulate the DML opperations and programmer have no control on this type of cursor. We use sql%notfound and sql%rowcount in implicit cursor. Explicit cursors are created by the programmer and programmer can control it by using these keywords Fetch, Open and close.

Define Oracle cursor attributes.
There are five types of cursors attributes
1- %isopen (Verify whether this cursor is open or not)
2- %found (If cursor fetch the data then %found return true)
3- %notfound (If cursor fetches not data then %notfound return true)
4- %rowcount (It return no. of rows that are in cursor and also give position of record)
5- %bulk_rowcount (%bulk_rowcount is same like %rowcount but it is used in bulk)

How can we pass variable in cursors?
We can pass the variable in cursor by using parameter cursor. Just we give the variable in it like cursor C1 (my_variable number).

What is the CASE statement and where we can use it?
CASE statement is just like IT-THEN-ELSE condition it is normally use when we are using some type of if else condition. When condition is founded true the case statement return the result and no further evaluating of data.

What is INDEX, when and where we can use it?
Index is using for performance tuning and also give us faster data retrieval of record from tables. Index can create on any column in table by default oracle B-Tree index.

Which operator that are not coming in Indexing?
NOT IN operator is not coming in indexing.

How we can get limited rows in SQL?
We can get limited rows in oracle database by using ROWNUM or HAVING clause.

What is the difference between Sub query and Co-related query?
One query contains more than one sub-query. The inner most query run first then second outer then third outer and so on. If we will not use relation on inner query to outer query then this query is called sub-query if we use relation then this query called Correlated query.
Example of Sub Query:
SELECT EMP_NAME, DEPTNO FROM EMP
WHERE EMP_NAME IN (SELECT EMP_NAME FROM DEPT)
Example of Correlated Query:
SELECT EMP_NAME, DEPTNO FROM EMP
WHERE EMP_NAME IN (SELECT EMP_NAME FROM DEPT WHERE EMP.DEPTNO = DEPT.DEPTNO)

What is exception handling and how we can handle the exception in Oracle?
Exception is an error situation which arises during program execution. When an error occurs exception is raised normally execution is stopped and control transfers to exception handling part. Exception handlers are routines written to handle the exception. The exceptions can be internally defined User-defined exception. In oracle we can handle exception by using these statements.
EXCEPTION WHEN
DUP_VAL_ON_INDEX
NOT_LOGGED_ON
NO_DATA_FOUND
TOO_MANY_ROWS
VALUE_ERROR
Can we define more than one exception in one block?
Yes we can define more than one exception in one block in oracle form builder like we will use DUP_VAL_ON_INDEX and NO_DATA_FOUND simultaneously

SQL,PL/SQL Interview Questions part-1


What is SQL statement?
SQL stands for Structured Query Language that is use for updating, deleting and inserting the information from databases. SQL is an ANSI and ISO standard and is the de-facto standard database query language. Oracle database also support this language.

What are database triggers and how many types of triggers?
Database triggers are a set of code that run or fire automatically when the specific operation will performed like Insert, Update and Delete. They are store procedures that are auto configure and fire when certain events take place in database.
There are two types of triggers
1- Tables level trigger
2- Row level trigger
Table level trigger are fire at one time but row level trigger fire on every row or on any transaction in the table.

What are the means of values of: new and: old in the trigger?
These two: new and: old are use in database triggers. These are basically use for referencing the trigger value by using triggers. For example we want to update anything in table and this table have database trigger on After Update then we use these two keywords for updating the values again this table.

What is the Mutating in the trigger?
The mutating will occur when in Oracle when the table that originally fired the triggering event is being accessed in the body of the trigger code, directly or implicitly in a procedure, or in a nested trigger called from the trigger body. This is because the table is in middle of a transaction, and referencing the same table again in the middle of the updating action causes the trigger to mutate.

Can we write a trigger for view?
Yes we can write a trigger on view by using key word “instead of” but did not use Before or After option on trigger.

Can we create a view on another view?
Yes we can create a view on another view.
What are the advantages of view?
1- Restrict the data and column s of the base tables.
2- Use complex quires easy and show the data of complex quires.
3- Make different views according to requirement on many on table.
4- We can hide business rules by using view.
What are function and how many types of functions?
Functions or user defined function are set of SQL/PLSQL code that are store in database and return the value. In function some data is manipulating by using some statement then return a specific value.

What is the difference between row level and Table level triggers?
Table level trigger are fire at one time but row level trigger fire on every row or on any transaction in the table.

What is the difference between Database triggers and Form level triggers?
Database trigger are written in database directly and fire on behalf of any transaction like Insert, Update and delete on table automatically. On the other hand we form level trigger are use in forms and fire on any level like item level, row level or on block level on requirement of application. Main difference in database trigger and form level triggers is that database trigger fire automatically and form level trigger fire on user or application requirement.

What is the advantage of stored procedure over the database triggers?
Store procedure are compile one time and stay in database and wait for calling but on the other hand database trigger fire every time when we have to perfume any change in database.

What are cascading of triggers?
Cascading of trigger means if we insert data in one table and that table have trigger on it then trigger fire. And in this trigger there is another table that we are using for insert the data in it and this table has also trigger on it then this trigger also fire. This is called cascading of triggers.

Latest Walkins

Jobs for 2011 Passouts

 

© Copyright oracle 2010 -2011