SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
C-15
Considerations—Character Expressions
host-variable-name
is the name of a host variable that contains a value with a character data type.
string-function-invocation
is a call to a function such as UPSHIFT, TRIM, or SUBSTRING that returns a string
as a result.
concatenation-operator
specifies this operator:
||
The concatenation operator concatenates two string operands and produces a
string as a result. If either of the character strings has a VARCHAR data type, the
result has a VARCHAR data type. If both character strings are fixed CHAR strings,
the result is a fixed CHAR. Operands should have identical character sets.
Considerations—Character Expressions
Guidelines for using character expressions in SQL statements
Character expressions can appear at any place where a string literal, parameter,
column, or host variable can appear. This diagram lists the usage of character
expressions:
{ character-expression relat-operator character-expression}
{ }
{ character-expression [NOT] LIKE character-expression }
{ }
{ character-expression [NOT] BETWEEN }
{ character-expression AND character-expression }
{ }
{ character-expression IS [NOT] NULL }
{ }
{ character-expression [NOT] IN { subquery } }
{ { in-value-list } }
{ }
{ character-expression relat-operator [ALL ] subquery }
{ [ANY ] }
{ [SOME] }
{ }
{ UPSHIFT ( character-expression ) }
When evaluating predicates with character expressions, the rules that apply to
string literals, columns, and other forms of character expressions also apply to this
usage.