SET VARIABLE statement

Changes the value of one or more variables.

Syntax

on_clause [when_clause] set_clause ;
Components

on_clause

A row arriving on the data source specified here triggers the variable value change specified in the set_clause. See ON Clause: Trigger Syntax for more information.

when_clause

A condition that limits when the trigger occurs. See WHEN Clause for more information.

set_clause

The variables and values to be set when the trigger occurs. See SET Clause: Set Variable Statement Syntax for more information.

Restrictions

See Also

Example

In this example, the messages in StreamA are counted:

ON StreamA
SET message_count = message_count+1;