Changes the value of one or more variables.
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. |
The Set statement can only be used with variables created with the Create Variable statement.
The expression used to set each variable's value must evaluate to the data type defined for the variable.
Create Variable Statement
ON
SET
WHEN
In this example, the messages in StreamA are counted:
ON StreamA SET message_count = message_count+1;