|iSQL*Plus User's Guide and Reference
Part Number A88826-01
Command Reference, 26 of 38
REPH[EADER] [PAGE] [printspec [text|variable] ...] | [ON|OFF]
where printspec represents one or more of the following clauses used to place and format the text:
Places and formats a specified report header at the top of each report, or lists the current REPHEADER definition.
Refer to the following list for a description of each term or clause. These terms and clauses also apply to the REPFOOTER command.
Represents a user variable or any of the following system-maintained values. SQL.LNO is the current line number, SQL.PNO is the current page number, SQL.RELEASE is the current Oracle release number, SQL.CODE is the current error code, and SQL.USER is the current username.
To print one of these values, reference the appropriate variable in the report header or footer. You can format variable with the FORMAT clause.
LE[FT] CE[NTER] R[IGHT]
Left-align, center, and right-align data on the current line respectively. SQL*Plus aligns following data items as a group, up to the end of the printspec or the next LEFT, CENTER, RIGHT, or COL command. CENTER and RIGHT use the SET LINESIZE value to calculate the position of the data item that follows.
Specifies a format model that determines the format of following data items, up to the next FORMAT clause or the end of the command. The format model must be a text constant such as A10 or $999.
If the datatype of the format model does not match the datatype of a given data item, the FORMAT clause has no effect on that item.
If no appropriate FORMAT model precedes a given data item, SQL*Plus prints NUMBER values according to the format specified by SET NUMFORMAT or, if you have not used SET NUMFORMAT, the default format. SQL*Plus prints DATE values using the default format.
Enter REPHEADER with no clauses to list the current REPHEADER definition.
If you do not enter a printspec clause before the text or variables, REPHEADER left justifies the text or variables.
You can use any number of constants and variables in a printspec. SQL*Plus displays the constants and variables in the order you specify, positioning and formatting each constant or variable as specified by the printspec clauses that precede it.
To define "EMPLOYEE LISTING REPORT" as a report header on a separate page, and to center it, enter:
REPHEADER PAGE CENTER 'EMPLOYEE LISTING REPORT' TTITLE RIGHT 'Page: ' FORMAT 999 SQL.PNO SELECT LAST_NAME, SALARY FROM EMP_DETAILS_VIEW WHERE SALARY > 12000; Page: 1 EMPLOYEE LISTING REPORT Page: 2 LAST_NAME SALARY ------------------------- ---------- King 24000 Kochhar 17000 De Haan 17000 Russell 14000 Partners 13500 Hartstein 13000 ---------- sum 98500 6 rows selected.