NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-59
Considerations—CONCAT
Except for the AS, STRIP, and SPACE clauses, which are described in this entry, the
descriptions of elements of print-item shown in the syntax box are the same as
the descriptions for elements of print-item in the DETAIL command. See
DETAIL Command
on page D-43 for more information.
AS format
is an Aw or a Cn display descriptor that specifies the width of the result of the
concatenated print list.
See AS Clause
on page A-54 for more information about these descriptors, but note
that the Cn.[w] format described under AS is not allowed in the CONCAT clause.
STRIP
directs the report writer to strip trailing blanks from the values in the list before
concatenating them.
SPACE number
specifies the number of spaces between the items in the list. Each space occupies
one single-byte print position, regardless of the character set used.
If you omit this clause, the default is 0. (Note that this default is different from the
default for the SPACE clause on other statements.) If you specify SPACE but omit
number, the default is 1.
Considerations—CONCAT
No default heading
Items specified in a CONCAT clause have no default heading. You must specify a
heading if you want one.
Default format
The default format for a item built from concatenated items is An, in which n is the
sum of the widths of the concatenated items.
The width of an item from a table is the width specified in the catalog definition for
the column that contains the item. The width of a string literal is the number of
characters in the string. The report writer estimates and sets a maximum width for
the result of an expression.
Concatenating single-byte and double-byte characters
You can concatenate single and double-byte characters, but you should avoid
concatentations that cause double-byte characters to begin or end in the middle of a
word. SQL does not prevent this, but the characters in such strings will be scrambled
if you attempt to print them using SQLCI.