Expressions

Syntax

expression:
case-expression
| constant
| [ correlation-name .] column-name [ java-ref ]
| - expression
| expression operator expression
| ( expression )
| function-name ( expression, ... )
| if-expression
| [ java-package-name.] java-class-name java-ref
| ( subquery )
| variable-name [ java-ref ]

Parameters

case-expression:
{ CASE search-condition
... WHEN expression THEN expression [, ...]
... [ ELSE expression ] 
END
| CASE
... WHEN search-condition THEN expression [, ...]
... [ ELSE expression ] 
END }
constant:
{ integer | number | 'string' | special-constant
| host-variable }
special-constant:
{ CURRENT { DATE | TIME | TIMESTAMP | USER }
| LAST USER
| NULL
| SQLCODE
| SQLSTATE }
if-expression:
IF condition
... THEN expression
... [ ELSE expression ]
ENDIF
java-ref:
{ .field-name [ java-ref ]
| >> field-name [ java-ref ]
| .method-name ( [ expression ] [, ...] ) [ java-ref ]
| >> method-name ( [ expression ] [, ...] ) [ java-ref ] }
operator:
{ + | - | * | / |  ||  | % }

Usage

Anywhere

Authorization

Must be connected to the database

Side effects

None

Description

Expressions are formed from several different kinds of element, discussed in the following sections.

Compatibility