Sql*Plus User’s Guide and Reference


-11 / Inserting Space after Every Row


Download 5.34 Mb.
Pdf ko'rish
bet87/103
Sana04.08.2023
Hajmi5.34 Mb.
#1665146
1   ...   83   84   85   86   87   88   89   90   ...   103
Bog'liq
E18404-12

6-11
/
Inserting Space after Every Row
You may wish to insert blank lines or a blank page after every row. To skip n lines 
after every row, use BREAK in the following form:
BREAK ON ROW SKIP 
n
To skip a page after every row, use
BREAK ON ROW SKIP PAGE
Using Multiple Spacing Techniques
Suppose you have more than one column in your ORDER BY clause and wish to insert 
space when each column's value changes. Each BREAK command you enter replaces 
the previous one. Thus, if you want to use different spacing techniques in one report 
or insert space after the value changes in more than one ordered column, you must 
specify multiple columns and actions in a single BREAK command.
Example 6–12
Combining Spacing Techniques
Type the following:
SELECT DEPARTMENT_ID, JOB_ID, LAST_NAME, SALARY
FROM EMP_DETAILS_VIEW
WHERE SALARY>12000
ORDER BY DEPARTMENT_ID, JOB_ID;
Now, to skip a page when the value of DEPARTMENT_ID changes and one line when 
the value of JOB_ID changes, enter the following command:
BREAK ON DEPARTMENT_ID SKIP PAGE ON JOB_ID SKIP 1
To show that SKIP PAGE has taken effect, create a TTITLE with a page number:
TTITLE COL 35 FORMAT 9 'Page:' SQL.PNO
Run the new query to see the results:
DEPARTMENT_ID LAST_NAME SALARY
------------- ------------------------- ----------
20 Hartstein 13000
80 Russell 14000
Partners 13500
90 King 24000
Kochhar 17000
De Haan 17000
6 rows selected.
Note:
SKIP PAGE does not cause a physical page break character to 
be generated unless you have also specified NEWPAGE 0.


Clarifying Your Report with Spacing and Summary Lines
6-12
SQL*Plus User's Guide and Reference

Download 5.34 Mb.

Do'stlaringiz bilan baham:
1   ...   83   84   85   86   87   88   89   90   ...   103




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling