General CCL Expressions

An expression is a combination of one or more values, operators, and Sybase functions that evaluate to a value. An expression generally assumes the data type of its components.

The following simple expression evaluates to 15 and is type INTEGER (the same type as its components):

5*3

The following expression is an example of a more complex expression that uses both functions and operators. The expression adds two to the price of a stock, rounds it to the nearest hundredth, and then divides it by four:

ROUND(Stock.price+2.0, 2))/4.

You can use expressions in many places including: