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

SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual540440-003
6-38
Character Value Expressions
Character (or string) value expressions are built from operands that can be:
Character string literals
Character string functions
Column references with character values
Host variables of type CHAR, VARCHAR, and PIC X(l)
Dynamic parameters
CURRENT_USER, SESSION_USER, and USER functions
Aggregate functions, sequence functions, scalar subqueries, CASE expressions,
or CAST expressions that return character values
Examples of Character Value Expressions
These are examples of character value expressions:
Expression Description
'ABILENE' Character string literal.
'ABILENE ' ||' TEXAS' The concatenation of two string literals.
'ABILENE ' ||' TEXAS' || x’55 53 41 The concatenation of three string literals to
form the literal: 'ABILENE TEXAS USA'
'Customer ' || custname The concatenation of a string literal with
the value in column CUSTNAME.
CAST (order_date AS CHAR) CAST function applied to a DATE value.