Creates a parameter within the module or submodule.
The Create Parameter statement creates a parameter that can be used by other CCL statements in the module. You can also create parameters using the Sybase CEP Studio interface. For instructions, see the Sybase CEP Studio Guide .
An expression evaluating to a literal of the appropriate data type can be used to set the default value for the new parameter. Parameters created with this statement can be used in all the same ways as those created with Sybase CEP Studio, but do not display in Sybase CEP Studio.
When the parameter is used in CCL statements, it must be preceded by a $ character using the following syntax: $parameter-name.
Parameters created with the Create Parameter statement are not displayed in Sybase CEP Studio.
Variables of a data type that does not permit literal constants cannot be initialized with the Create Parameter statement.
Here is an example of a Create Parameter statement, followed by a Query statement that uses the parameter.
CREATE PARAMETER INTEGER AcceptableThreshold = 10; INSERT INTO StreamOut SELECT * FROM StreamIn WHERE Quantity > $AcceptableThreshold;