|SQL*Plus® User's Guide and Reference
Part Number E16604-02
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:
COL nS[KIP] [n]TAB nLE[FT]CE[NTER]R[IGHT]BOLD FORMAT text
These terms and clauses also apply to the REPFOOTER command.
The report header or footer text. Enter text in single quotes if you want to place more than one word on a single line. The default is NULL.
A substitution variable or any of the following system-maintained values. SQL.LNO is the current line number, SQL.PNO is the current page number, SQL.CODE is the current error code, SQL.RELEASE is the current Oracle Database release number, 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 use the FORMAT clause to format variable.
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.
Prints data in bold print. SQL*Plus represents bold print on your terminal by repeating the data on three consecutive lines. On some operating systems, SQL*Plus may instruct your printer to print bold text on three consecutive lines, instead of bold.
Specifies a format model that determines the format of 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. See COLUMN for more information on formatting and valid format models.
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.
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.
To suppress the report header without changing its definition, enter: