SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual540440-003
6-61
Character String Literals
You can specify string literals using hexadecimal code values in DML statements.
_character-set
specifies the character set ISO88591 or UCS2. If you omit the character set
specification, the default is whatever character set default you set when you
installed NonStop SQL/MX. See Character Sets on page 6-3.
N
associates the system default character set with the string literal. The default is set
by the value of the NATIONAL_CHARSET attribute during SQL/MX installation.
See National Character Set on page 10-47.
X
represents the X in hexadecimal notation.
'hex-code-value'
represents the code value of a character in hexadecimal form enclosed in single
quotes. It must contain an even number of hexadecimal digits. For UCS2, KANJI
and KSC5601, each hex-code-value must be of four hexadecimal digits long. For
ISO88591, each value must be two digits long. If hex-code-value is improperly
formatted (for example, it contains an invalid hexadecimal digit or an odd number
of hexadecimal digits), an error is returned.
space
is space sequences that can be added before or after hex-code-value for
readability. The encoding for space must be the TERMINAL_CHARSET for an
interactive interface and the SQL module character set for the programmatic
interface.
Considerations for Character String Literals
Using String Literals
You can use a character string literal anywhere you need to supply a column value that
has a character string data type. A string literal can be as long as a character column.
See Character String Data Types on page 6-19.
You can also use string literals in string value expressions—for example, in
expressions that use the concatenation operator (||) or in expressions that use
functions returning string values.
[_character-set | N] X'hex-code-value... '
| [_character-set | N] X'[space…]hex-code-value[[space…]
hex-code-value...][space…]'