NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
B-9
Examples—BREAK ON
To sort break columns, include an ORDER BY clause in the associated SELECT
statement.
Examples—BREAK ON
The following example groups detail lines by job codes within groups of
departments. When finished, enter CANCEL at the select-in progress prompt (S>):
>> SET LIST_COUNT 0;
>> SELECT LAST_NAME, FIRST_NAME, JOBCODE, DEPTNUM
+> FROM PERSNL.EMPLOYEE
+> WHERE SALARY > 20000
+> ORDER BY DEPTNUM, JOBCODE;
S> BREAK ON DEPTNUM, JOBCODE;
S> LIST NEXT 8;
LAST_NAME FIRST_NAME JOBCODE DEPTNUM
-------------------- --------------- ------- -------
HOWARD JERRY 100 1000
CLARK LARRY 500
BARTON RICHARD
KELLY JULIA
WHITE ROBERT 100 1500
SCHNEIDER JIMMY 600
MITCHELL JONATHAN
RUDLOFF THOMAS 100 2000
S> CANCEL;
>>