Total Pageviews

April 7, 2016

4/07/2016 09:23:00 AM
1.    What is NOCOPY?
       By default the IN parameter is passed by reference and the OUT and IN OUT parameters
       are passed by value.
       NOCOPY :  is a compiles hint that can be used with OUT and IN OUT parameter to
       request to pass by reference. This improves the performance with OUT and INOUT
A) Tabular Report                             B) Group Left Report
C) Group Above Report                      D) Form like report
E) Matrix Report                               F) Multi Media Report
G) Mailing Label Report                      H) OLE Report.
3.    ANCHOR
Anchors are used to determine the vertical and horizontal positioning of a child object relative to its parent object. The end of the anchor should be attached to the parent object.
A) Parent Object                               B) Child Object

Since the size of the some layout objects may change when the report runs (When the data is actually fetched), anchors need to be defined to make the appearance of the object
An Anchor defines the relative position of an object to the object to which if this anchored.
* Symbol is
By pressing the shift key Anchor can be moved.
Anchor Properties :
A) Child Edge percent on child edge type         B) Child Object Name
C) Collapse Horizontally                               D) Collapse vertically
E) Comments                                            F) Name
* Two child objects can be related to one parent object by an Anchor.
4.    User Exits :
An user exit is :- Program that can be written and linked into the report builder executable or user exit DLL files.
User exits are build when ever the control need to be passed from the report builder to a program, which performs some function and then control returns to the Report Builder.
Types of user exits :-
A)   Oracle Pre-Complier user exits.
B)   OCI (Oracle Call Interface user exits)
C)   Non – Oracle user exits.
User exits can perform the following tasks.
Perform complex data manipulation.
Pass data to report builder from OS text files.
Support PL/SQL blocks.
Control real time devices be printer or robot.
5.    Types of Triggers in Reports :-
* Report Triggers          * Data Triggers                  * Layout Triggers

Report Triggers :-

After Parameter form Trigger.
After Report Trigger
Before parameter form Trigger
Before Report Trigger.
Between Pages Trigger
+ Firing Sequence
* Before Parameter form Trigger
-          Fires before the runtime parameter form is displayed.
-          The parameter values can be accessed and changed.
*    After Parameter form Trigger.
-          fires after the runtime parameter form is displayed.
-          The parameters can be accessed and their values can be checked.
*    Before Report Trigger
-          Fires before the report is executed but after the queries are passed and data is fetched.
*   Between Pages Trigger.
-          Fires between each page of the report is formatted, except the very first pages.
-          This is used for customized page formatting.
*    After Report Trigger
-          Fires after exiting from the run time premier or after report output is sent to a specified destination. (File, Printer, Mai lid etc….)
-          This is used to clean up any initial processing that was done such as deleting the tables.
-          This Trigger always fires irrespective of success or failure of the report.
*   Ref Cursor Query.
-          This uses PL/SQL to fetch data for the report.
-          In this a PL/SQL function need to be specified to return a cursor value from a cursor variable.
* Group Filter:
This is PL/SQL function that determines which records to be included in a group in the                property is PL/SQL.
-          The function must return a BOOLEAN value.
True …….. Includes the current record in the report.
          False ……. Excludes the current record from the report.
          *  Formula
-          These are Pl/SQL functions that populate formula or place holder columns.
* Validation Trigger     
-          These are also PL/SQL functions that are executed when parameter values are specified on the command line and when the runtime parameter form is accepted.
-          Are also used to validate the initial value property of the parameter.
* Layout Triggers
* Format Trigger.
-          These are PL/SQL functions executed before the object is formatted.
-          Used to dynamically change the formatting attributes of the object.
* Action Trigger
-          These are Pl/SQL procedures executed when a button is selected in the run time
-          This can be used to dynamically call another report or execute any other PL/SQL.
6    Formula Column
It performs a user-defined computation on another columns data, including Place-
holder columns.
Formulas are PL/SQL functions that populate formula or place holder columns.
Cannot be used to populate parameter values.
7     Summary Column
-          Performs a computation on another columns data like sum, average, count, minimum, maximum, %, total.
-          For group reports, the report wizard and data wizard create ‘n’ summary fields in the data model for each summary column that is defined.
---à One at each group level above the column being summarized.
-à      One at the report level.
8     Place Holder Column 
-          A Place holder column is a column for which, the data type and value can be set dynamically (Programmatically)
*   The value can be set for a place holder column in the following places.
-          Before report trigger if the place holder is a report level column.
-           Report level formula column, if the place holder is a report level column.
-          A formula in the place holders group below it (The value is set once for each record of the group)

9     Repeating Frame 

-          Repeating frame surrounds all of the fields that are created for a groups columns.
-          Repeating frame prints once for each record of the group.
-          For frames and repeating frames, the property elasticity defines whether the size of the frame or repeating frame should with the objects inside of it at runtime.

10  Frame

-          Surrounds the objects and protect them from being over written or pushed by other objects.

11  System Parameters in Reports

* Background                         * Copies                           * Currency             
* Decimal                              * Desformat                      * Desname
* Destype                              * Mode                             * Orientation
* Print Job                             * Thousands

12  Data Link

-          Data links relate the results of multiple queries.
-          A data link (Parent – Child Relation Ship) causes the child query to be executed once for each instance of its parent group.

13  In which tables FF are stored?


14  Advantages of stored functions and procedures
*        Applications can be modularized.
*        Easy maintenance.
-          Rowtines can be modified online without interfering other users.
-          One routine can be modified to effect multiple applications.
*        Improved data security and integrity.
-          Indirect access to database objects can be controlled from non privileged users with security privileges.
*        Improved performance.
-          Reparsing for multiple users can be avoided by exploiting the shared SQL area.
-          PL/SQL parsing at run-time can be avoided by pursing at compile time.
-          Number of calls to the database can be reduced and network traffic decreased by bundling commands.
*        Improved code clarity.
-          The clarity of code increases by using appropriate identifier names to describe the
action of the routines which reduces the need for comments.

15 Difference between a function and a procedure

                             Functions                                                       Procedures
            * Invoke as a part of an expression.                  Execute as a PL/SQL statement.
          * Must contain a RETURN clause in the header.     Do not contain a RETURN Clause in the header.
* Must return a single value.                    Can return none, one or many values.
* Must contain at fast one RETURN Statement.     Can contain a RETURN Statement.
* Do not contain OUT and INOUT                        Can contain IN, Out and
             IN OUT parameters.                                               IN OUT Parameters.

16 About Cursors

-          Oracle server uses some private work areas to execute SQL statements and to store processing information.
*   By using PL/SQL cursors these private SQL areas can be named and the stored
      information can be accessed.
Two Types:
* Implicit Cursors.
-          Implicit cursors are declared by PL/SQL implicitly for all DML and PL/SQL select statements, including queries that return only one row.
-          Oracle Server implicitly opens a cursor to process each SQL statement not associated with on explicitly declared cursor.
-          The most recent implicit cursor can be returned as the SQL cursor.
* Explicit Cursors
-          For queries that return more than one row, explicit cursors are declared and named by the programmes and manipulated through specific statements in the block’s executable actions.
-          Explicit cursors are used to individually process each row returned by a multiple-row SELECT statement.
-          The set of rows returned by a multiple – row query is called as active set.
Declare              Open            Fetch                      Empty?                   Close

Cursor Attributes:-

Attribute                          Type                          Description
% is open                    Boolean         Evaluates to TRUE if the cursor is open.
% not found                 Boolean         Evaluates to TRUE if the most recent fetch doesn’t return a row.
% found                      Boolean         Evaluate to TRUE if the most recent fetch returns a row.
                                                     Complement of % not found.              
     % Row Count               Number         Evaluates the total number of rows returned so far.      

Parameterized Cursors:-

-          Parameters can be passed to the cursor in a cursor for loop.
-          It allow to open and close an explicit cursor several times in a block, returning a different active set on each occasion for each execution, the previous cursor is closed and reopened with a new set of parameters.
-          Sizes should not be mentioned for the data types of parameters the parameters names are for references in the query expression of the cursor.

17 Confined Mode:-

-          If it is on, child objects cannot be moved outside their enclosing parent objects.
-          If it is off child objects can be moved out sides their enclosing parent objects.

Flex Mode:-

-          If it is on, parent  borders stretch when child objects are moved against them.
-          If it is off, parent borders remain fixed when child objects are moved against them.

18 Parameters

-          A parameter is a variable whose value can be set at runtime (from the run time parameter of the command line).
-          User parameters are created by the user and system parameters are created by Report Builder.
-          System parameters cannot be renamed or deleted.
Bind Parameters (Variables)
-          Bind references  (or Variables) are used to replace a single value in SQL or PL/SQL, such as a character string, number or date.
-          Bind references may be used to replace expressions in SELECT, WHERE, GROUP BY, ORDER BY, HAVING, CONNECT BY and  START WITH clauses of queries.
-          Bind references cannot be referenced in FROM clauses.
-          Bind variables can be referenced by entering a colon (:) followed immediately by the column or parameter name.
-          If the parameter / column is not created before making a bind reference, report builder will create a parameter.
Lexical Parameters (Variables)
-          Lexical references are place holders for text that is embedded in a SELECT statement.
-          Lexical Variables can replace the clauses appearing after SLECT, FROM, WHERE, GROUP BY, ORDER BY, HAVING, CONNECT BY, and  START WITH.

What is % Row type

-          %  Row types is used to declare a record based on a collection of columns in a database table or view.
-          The fields in the record take their names and data types from the columns of the table or view.
-          The record can also store an entire row of data fetched from a cursor or cursor variable.
-          % Row type should be prefixed with the database table.
Ex: Declare
     Emp_record   employee%row type.
Then emp_record will have a structure consisting of all the fields each representing a column in the employees table.

What is a Ref Cursor?

-          Oracle server uses unnamed memory spaces to store data used in implicit cursors.
-          Ref cursors are used to define a cursor variable, which will point to that memory space and can be used like pointers in SQL ‘S’.

About Exceptions

-          An exception is an identifier in PL/SQL that is raised during the execution of a black that terminates its main body of actions.
-          A block always terminates when PL/SQL raises an exception so that an exception handler should be specified to perform final actions.
*  Exception can be raised in two ways exception is raised automatically.
  1. Ex:- when no rows are retrieved from the database in a SELECT statement, then error
  ORA-01403 occurs and the exception NO-DATA-FOUND is raised by PL/SQL.
  1. Ex:- Exception can be raised explicitly by issuing the RAISE statement with in the
-          The exception being raised may be either.

User-Defined or Pre Defined

Trapping an exception:-

-          If the exception is raised in executable section of the block, processing branches to the corresponding exception handler in the exception section of the block.
-          If PL/SQL successfully handles the exception, then the exception doesn’t propagate to the enclosing block or calling environment.
-          The PL/SQL block terminates successfully.

Propagating an exception:-

- If the exception is raised in the executable section of the block and there is no corresponding exception handler, the PL/SQL block terminates with failure and the exception will be propagated to the calling environment.

Types of exceptions:-

A)   Pre-Defined Oracle Server Exceptions. -à Implicitly Raised.
B)   Non-Pre defined Oracle server exceptions. -à Implicitly Raised.
C)   User-defined exceptions -à Explicitly Raised.

Pre-Defined Oracle Server Exceptions:-

-          These are the error(20) that occur most often in PL/SQL code.
-          These exceptions need not be declared and raised implicitly by Oracle Server, NO-DATA-FOUND, LOGIN_DENIED, ZERO_DIVIDE.

Non-Pre-Defined Oracle Server Exceptions:-

-          These are the other standard Oracle Server errors.
-          These exceptions need to be declared ion the declarative section and raised by Oracle server implicitly.

User Defined Exceptions:-

-          These are the conditions that the developer determines as abnormal.

-          These need to be declared and raised explicitly.
Related Posts Plugin for WordPress, Blogger...