NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
L-13
Considerations—LINE_NUMBER
You can use LINE_NUMBER in any report writer command with a print list, but SQL
calculates the function value for detail lines only (not title or footing lines, for example),
so it is generally useful only in DETAIL commands.
OVER REPORT
determines the line number by setting a count of 0 at the beginning of the report and
incrementing the number by 1 at the start of each detail line.
OVER PAGE
determines the line number by setting a count of 0 at the beginning of each page and
incrementing the number by 1 at the start of each detail line. (A detail line is a
logical output line specified by the print list on a DETAIL command; it might
consist of more than one physical line.)
OVER break-column
determines the line number by setting a count of 0 when the value of the specified
break column changes and incrementing the number by 1 at the start of each detail
line in the group. break column is a column name, alias, detail alias, or COL
number that identifies a column named in a BREAK ON command.
Considerations—LINE_NUMBER
Default display format
The default format for line numbers is I11.
BREAK ON required if using break columns
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).
[ OVER REPORT ]
LINE_NUMBER [ OVER PAGE ]
[ OVER break-column ]
The default is OVER REPORT.