O'Reilly logo

Advanced Oracle PL/SQL Programming with Packages by Steven Feuerstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8.2. Displaying PLVtab Tables

For each type of table, PLVtab provides a display procedure to show the contents of the table. As a result, there are nine, overloaded versions of the display procedure. The headers for each of these programs are the same, except for the datatype of the first parameter (the kind of table to be displayed).

Here, for example, is the specification of the procedure to display a date table:

PROCEDURE display 
    (tab_in IN date_table, 
     end_in IN INTEGER,
     hdr_in IN VARCHAR2 := NULL,
     start_in IN INTEGER := 1,
     failure_threshold_in IN INTEGER := 0,
     increment_in IN INTEGER := +1);

As you can see, there are lots of parameters, and that means lots of flexibility in specifying what rows are displayed and the format of the display. Here is an explanation of the various arguments:

ArgumentDescription
tab_inThe PL/SQL table you want to display. The table type must be one of those predefined in PLVtab.
end_inThe last row you want displayed. This is required. Until PL/SQL Release 2.3 there is no way for PLVtab to know the total number of rows defined in the table. As you will see below, you can also specify the starting row, which defaults to 1.
hdr_inThe header you want displayed before the individual rows are written out using the p.l procedure.
start_inThe first row you want displayed. The default value is 1. This is placed after the end_in argument because in almost every case it will not need to be specified.
failure_threshold_inThe number of times the display program can ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required