Expressions.expr-primary-cast

Converts a value from one type to another.

Format

SQL Format:

CAST ( expression AS

{ INTERVAL | BOOL | BOOLEAN | INTEGER | INT | LONGINTEGER | LINT | REAL | FLOAT | STRING | DATETIME | LOCATION | REGION } )

ODBC Format:

{{ FN CONVERT ( expression ,

{ SQL_BIT | SQL_INTEGER | SQL_BIGINT | SQL_REAL | SQL_FLOAT | SQL_DOUBLE | SQL_CHAR | SQL_VARCHAR | SQL_TIMESTAMP } ) }}

Remarks

The CAST operator will attempt to convert the result of the expression to the specified data-type.

Not all conversions are legal.


Disclaimer

Geo SCADA Expert 2022