CREATE PARAMETER statement

Creates a parameter within the module or submodule.

Syntax

CREATE PARAMETER data_type name [= value] ;
Components

data_type

The CCL data type of the parameter.

name

The name of the parameter.

value

A literal of the specified type.

Usage

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.

Restrictions

Example

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;