Expressions.expr-primary-cast

Converts a value from one type to another

Format

SQL Format:

CAST ( expression AS

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

ODBC Format:

{{ FN CONVERT ( expression ,

{ SQL_BIT | SQL_INTEGER | 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 2019