Skip to Main Content
Advanced Oracle PL/SQL Programming with Packages
book

Advanced Oracle PL/SQL Programming with Packages

by Steven Feuerstein
October 1996
Intermediate to advanced content levelIntermediate to advanced
687 pages
16h 41m
English
O'Reilly Media, Inc.
Content preview from Advanced Oracle PL/SQL Programming with Packages

12.3. Managing the Source Repository

To read information from a PLVio repository, you must do the following:

  1. Define the source using the setsrc program.

  2. Fine-tune your access to the source repository. You can modify the WHERE clause of your SELECT from a database table source with a number of procedures.

  3. Initialize the source using the initsrc program.

You are then ready to use the get_line procedure to retrieve lines of text from the source repository.

This section explains the setsrc and initsrc procedures. The next section explores how to modify the WHERE clause of the source SELECT for database tables.

12.3.1. Setting the Source

The setsrc procedure assigns the type of source repository and defines the structure of the source (if a database table). The header for setsrc is as follows:

PROCEDURE setsrc
   (srctype_in IN VARCHAR2,  
    name_in IN VARCHAR2 := 'user_source',
    name_col_in IN VARCHAR2 := 'name',
    srctype_col_in IN VARCHAR2 := 'type',
    line#_col_in IN VARCHAR2 := 'line',
    text_col_in IN VARCHAR2 := 'text',
    schema_col_in IN VARCHAR2 := NULL);

The first argument, srctype_in, is the type of repository. The second argument, name_in, is the name of the repository. Its content varies according to the type of repository and will be explained below. The third through seventh arguments provide the names of the columns required for a database table source. The default values match the structure of the default table (the USER_SOURCE data dictionary view). Notice, therefore, that the schema ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle Database 12c PL/SQL Programming

Oracle Database 12c PL/SQL Programming

Michael McLaughlin
Oracle PL/SQL for DBAs

Oracle PL/SQL for DBAs

Arup Nanda, Steven Feuerstein
Expert Oracle PL/SQL

Expert Oracle PL/SQL

Ron Hardman, Michael McLaughlin

Publisher Resources

ISBN: 1565922387Supplemental ContentCatalog PageErrata