This is an old revision of the document!
The CAST function converts expressions to a specified data type. Column formatting will be the default for the specified data type.
Due to conflicts in specifications, the main OmniAccess data types are not supported here. The $CONVERT function should be used for OmniAccess data types and for more specific functions.
CAST(scalar_expression AS datatype[(n)])
Required. The column name that is to be cast.
Required
Required. The supported SQL92 data type.
Length if applicable.
SELECT amount, CAST(orders.amount AS DOUBLE PRECISION) FROM orders WHERE STATUS='cncl'
SELECT order_date, CAST(SUBSTRING(order_date FROM 1 FOR 2) AS INTEGER) FROM orders WHERE STATUS='back'