SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
L-15
Considerations—LINE_NUMBER
Considerations—LINE_NUMBER
The default format for line numbers is I11.
If you specify LINE_NUMBER OVER break-column, you must enter a BREAK
ON command that defines the referenced break column (and that also defines
break columns referenced in other LINE_NUMBER function calls in the current
set).
Examples—LINE_NUMBER
This example produces a line that contains a line number, part number, and part
name. The line numbers start over at 1 on the first line of each page.
S> DETAIL LINE_NUMBER OVER PAGE, PARTNUM, PARTDESC;
(EXPR) PARTNUM PARTDESC
----------- ------- ------------------
1 212 SYSTEM 192KB CORE
2 244 SYSTEM 192KB SEMI
3 1403 PROC 96KB SEMI
...
(EXPR) PARTNUM PARTDESC
----------- ------- ------------------
1 2053 EDITOR
2 2267 TEXT FORMATTER
3 2598 C COMPILER
...
This example prints the same information as the preceding command but in a
different format.
S> DETAIL LINE_NUMBER AS I4 NOHEAD, PARTNUM, PARTDESC;
PARTNUM PARTDESC
------- ------------------
1 212 SYSTEM 192KB CORE
2 244 SYSTEM 192KB SEMI
3 1403 PROC 96KB SEMI
...