The syntax for a national literal is defined as follows:
national_literal ::=
{
} |
uc-character ::= {
character |
esc 4hex |
esc+ 6hex |
esc esc }
character
A Unicode character which is also contained in the EDF03IRV character set. If a string contains a single quote ('), you must duplicate this single quote. The duplicated single quote counts as one character.
4hex
4hex is a group of 4 consecutive hexadecimal characters and constitutes a UTF-16 code unit which must be in the range 0000 through FFFF. (However, the UTF-16 code units FFFE and FFFF and the code units in the range FDD0 - FDEF are so-called noncharacters and may not be used in literals in SESAM/SQL, see the Unicode concept in SESAM/SQL in the “Core Manual”.) When 4hex is specified, lower case is permitted for the hexadecimal characters A through F.
Example
NX'004100420043'
for the string 'ABC'.
esc 4hex
Hexadecimal representation of a code point through the escape character esc and (without any intervening blank) a 4-digit hexadecimal value 4hex which must be in the range 0000 through FFFD. The specification esc must be written exactly as specified in the UESCAPE clause. When esc4hex is specified, lower case is permitted for the hexadecimal characters A through F.
Example
U&'\00DF'
for the character 'ß’
U&'\0395\03BB\03BB\03B7\03BD\03B9\03BA\03AC means Greek’
returns the string “ Ελληνικά
means Greek”
esc+ 6hex
Hexadecimal representation of a code point through the escape character esc followed by „+“ and (without any intervening blank) a 6-digit hexadecimal value 6hex which must be in the range 000000 through 10FFFD. (The code points 10FFFE and 10FFFF and also the code points from the ranges 0xFFFE and 0xFFFF (where x is a hexadecimal number) are so-called noncharacters and may not be used in literals in SESAM/SQL, see the Unicode concept in SESAM/SQL in the “ Core manual”). The specification esc must be written exactly as specified in the UESCAPE clause. When esc+ 6hex is specified, lower case is permitted for the hexadecimal characters A through F.
Example
U&'\+0000DF’
for the character 'ß'.
esc esc
With esc esc (without any intervening blank) you can invalidate the esc character, as a result of which this string represents an esc character.
Example
U&'\\’
for the character '\'
UESCAPE '
esc '
Specification of an escape character. esc can be any alphanumeric character with the exception of the plus character, double quotes ("), single quote (') and blank.
If UESCAPE '
esc '
is not specified, the backslash (\) is used as the default.
The data type of a national literal is NCHAR(cu_length). cu_length is the number of code units (1 code unit in UTF-16 = 2 bytes). The strings may be up to 128 code units long. Strings of which are 0 characters long are permitted as literals, although it is not possible to define a data type NCHAR(0) (see the section "Strings"). The data type is then NVARCHAR(0).
1 code unit is required to represent a code point in UTF-16, except in the case of code points which are contained in the range 010000 through 10FFFD. These code points require two code units.
The various forms of national data type can be concatenated as, for example, in “Price in €”:
N'Price in '||NX'20AC'
N'Price in '||U&'\20AC'
“||” must be used as the operator for the concatenation.
separator
Separator that separates two substrings from each other (see section "Separators"). If a national literal consists of two or more substrings, adjacent substrings must be separated by one or more separators. At least one of the separators must be a transition point to the next row.
The result of a string literal consisting of substrings is the concatenation of the substrings involved without the operator for concatenation having to be written for this purpose.