Cast function | Operand data types | Remarks |
CAST (AS INTEGER) | <DECIMAL> <DOUBLE> <VARCHAR> | Use CAST_AS_INTEGER as FunctionName. |
CAST (AS DECIMAL) | <INTEGER>, <INTEGER>, <INTEGER> <DECIMAL>, <INTEGER>, <INTEGER> <DOUBLE>, <INTEGER>, <INTEGER> <VARCHAR>, <INTEGER>, <INTEGER> | Use CAST_AS_DECIMAL as FunctionName. The second and third operands are the decimal precision and scale, for example 20 and 8 in CAST (AS DECIMAL (20, 8)). Specify the default precision and scale using the iServer configuration variables DefaultDecimalPrecision and DefaultDecimalScale. |
CAST (AS DOUBLE) | <INTEGER> <DECIMAL> <VARCHAR> | Use CAST_AS_DOUBLE as FunctionName. |
CAST (AS VARCHAR) | <INTEGER>, <INTEGER> <DECIMAL>, <INTEGER> <DOUBLE>, <INTEGER> <VARCHAR>, <INTEGER> <TIMESTAMP>, <INTEGER> | Use CAST_AS_VARCHAR as FunctionName. The second operand is the string length, for example 50 in CAST(AS VARCHAR (50)). Specify the default string length using the iHub configuration variable DefaultStringLength. |
CAST (AS TIMESTAMP) | <VARCHAR> | Use CAST_AS_TIMESTAMP as FunctionName. |