Neoview SQL Reference Manual (R2.2)

Expressions
An SQL value expression, referred to as an expression, can evaluate to a value with one of these
:
Operands can be combined with the concatenation
operator (||). Example: 'HOUSTON,' ||' TEXAS'
“Character Value Expressions” (page 208)
Operands can be combined in specific ways with
arithmetic operators. Example: CURRENT_DATE +
INTERVAL '1' DAY
“Datetime Value Expressions” (page 210)
Operands can be combined in specific ways with addition
and subtraction operators. Example: INTERVAL '2'
YEAR - INTERVAL '3' MONTH
“Interval Value Expressions” (page 213)
Operands can be combined in specific ways with
arithmetic operators. Example: SALARY * 1.10
“Numeric Value Expressions” (page 217)
The data type of an expression is the data type of the value of the expression.
A value expression can be, among other things, a character string literal, a numeric literal, a
dynamic parameter, or a column name that specifies the value of the column in a row of a table.
A value expression can also include, among other operands, functions and scalar subqueries.
Character Value Expressions
The operands of a character value expression—referred to as character primaries—can be
combined with the concatenation operator (||). The data type of a character primary is character
string.
character-expression is:
character-primary
| character-expression || character-primary
character-primary is:
character-string-literal
| column-reference
| character-type-host-variable
| dynamic parameter
| character-value-function
| aggregate-function
| sequence-function
| scalar-subquery
| CASE-expression
| CAST-expression
| (character-expression)
Character (or string) value expressions are built from operands that can be:
Character string literals
Character string functions
Column references with character values
Dynamic parameters
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:
DescriptionExpression
Character string literal.
'ABILENE'
208 SQL Language Elements