Neoview SQL Reference Manual (R2.4)
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
A string literal can be as long as a character column. See “Character String Data Types” (page 233).
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.
When specifying string literals:
• Do not put a space between the character set qualifier and the character string literal. If you
use this character string literal in a statement, Neoview SQL returns an error.
• To specify a single quotation mark within a string literal, use two consecutive single quotation
marks.
• To specify a string literal whose length is more than one line, separate the literal into several
smaller string literals, and use the concatenation operator (||) to concatenate them.
• Case is significant in string literals. Lowercase letters are not equivalent to the corresponding
uppercase letters.
• Leading and trailing spaces within a string literal are significant.
• Alternately, a string whose length is more than one line can be written as a literal followed
by a space, CR, or tab character, followed by another string literal.
Examples of Character String Literals
• These data type column specifications are shown with examples of literals that can be stored
in the columns.
Character String Literal ExampleCharacter String Data Type
'PLANNING'CHAR (12) UPSHIFT
'Planning'PIC X (12)
'NEW YORK'VARCHAR (18)
• These are string literals:
'This is a string literal.'
'abc^&*'
'1234.56'
'This literal contains '' a single quotation mark.'
• This is a string literal concatenated over three lines:
'This literal is' ||
' in three parts,' ||
'specified over three lines.'
• This is a hexadecimal string literal representing the VARCHAR pattern of the ASCII string
'Strauß':
_ISO88591 X'53 74 72 61 75 DF'
Datetime Literals
• “Examples of Datetime Literals”
A datetime literal is a DATE, TIME, or TIMESTAMP constant you can use in an expression, in
a statement, or as a parameter value. Datetime literals have the same range of valid values as
Literals 257