- Categories:
AS_ DOUBLE , AS_ REAL¶
Casts a VARIANT value to a floating-point value.
AS_DOUBLE is a synonym for AS_REAL.
The DOUBLE and REAL data types are synonymous with the FLOAT data type.
- See also:
Syntax¶
Arguments¶
variant_exprAn expression that evaluates to a value of type VARIANT.
Returns¶
The function returns a floating-point value or NULL:
- If the type of the value in the
variant_exprargument is a floating-point value, the function returns the floating-point value.
- If the type of the value in the
variant_exprargument doesn’t match the type of the output value, the function returns NULL. - If the
variant_exprargument is NULL, the function returns NULL.
Examples¶
Create a table and load data into it:
Use the AS_DOUBLE function in a query to cast a VARIANT value to a DOUBLE value: