SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
C-14
Character Expressions
Character Expressions
A character expression specifies a value and can be a simple string literal or a column
name that specifies the value of a column in a row of a table. The expression can
include string operators and function calls that return string results. All these are
character expressions:
A character expression has a CHAR or VARCHAR data type and can be upshifted.
A character expression consists of one or more operands connected by string
operators, as shown in the diagram.
string-literal
represents a series of characters and consists of that series of characters
surrounded by double or single quotation marks, optionally preceded by a clause
that specifies the character set associated with the characters. For information, see
String Literals on page S-80.
column-name
is the valid name of a column in a table, optionally qualified by a collation name.
The column name must refer to a column with a character data type.
parameter-name
is a parameter of a character data type, optionally associated with a collation.
“ABILENE” A character string
CUSTNAME The value in column CUSTNAME
SUBSTRING (“Robert” FROM 0 FOR
3)
The SUBSTRING function applied to the
string “Robert”
string-operand [ [ string-operator
string-operand ] ... ]
string-operand is:
{ string-literal }
{ column-name }
{ parameter-name }
{ host-variable-name }
{ string-function-invocation }
string-operator is:
{ concatenation-operator }