SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
B-11
Example—BREAK TITLE
Example—BREAK TITLE
These commands select data and identify DEPTNUM as a break column:
>> SELECT D.DEPTNUM, DEPTNAME, EMPNUM, JOBCODE
+> FROM PERSNL.EMPLOYEE E, PERSNL.DEPT D
+> WHERE E.DEPTNUM = D.DEPTNUM
+> ORDER BY D.DEPTNUM;
S> DETAIL D.DEPTNUM, EMPNUM, JOBCODE;
S> BREAK ON COL 1;
Before the first detail line is printed, and each time the value of DEPTNUM
changes, the break title defined in this command appears in the report:
S> BREAK TITLE D.DEPTNUM
+> ( CONCAT (DEPTNAME STRIP, " Department") );
S> LIST NEXT 8;
DEPTNUM EMPNUM JOBCODE
------- ------ -------
FINANCE Department
1000 23 100
202 500
208 900
210 500
214 500
PERSONNEL Department
1500 209 900
211 600
212 600
BUFFERED File Attribute
BUFFERED is a Guardian file attribute that specifies whether to buffer writes to a disk
file. BUFFERED applies to key-sequenced, relative, entry-sequenced tables, and to
indexes.
The default for an audited table is BUFFERED. The default for a nonaudited table is
NO BUFFERED. The index default is the table value at index creation.
Considerations—BUFFERED
All retrieved rows are stored in cache memory temporarily. In a NO BUFFERED
file, a block that contains an updated row is written to disk immediately. In a
BUFFERED file, a block that contains an updated row is not written to disk until a
system event (such as the need for more cache memory) triggers a write
operation. An updated block can change more than once without the need for
writing each change to disk as the change occurs.
Buffering can improve transaction times by reducing the number of writes required
and by deferring writes so that the disk process can write a string of blocks in a
{ BUFFERED | NO BUFFERED }