Skip to content

Conversion Operations#

CAST#

Syntax

CAST(<source_expr> AS <target_data_type>)

Description

Converts a value of one data type into another data type.

View examples

Formula Editor Example

Given the following table:

VALUE
314159.07
5535.79

Applied formula:

CAST()

Output:

VALUE_CAST
314159.0
5536.0

SQL Editor Example

Convert a string containing a number to a decimal with specified scale (2):

select cast('1.2345' as decimal(15,2));

Output

CAST('1.2345' AS DECIMAL(15,2))
1.23