Cast a Table Column
Converts a table column to a specified data type.
Overview
This procedure casts a specified column in a table to a given data type. It supports conversion to common data types including text, decimals, and integers. For numeric conversions, it automatically handles comma-separated values and provides options for handling blank values.
Syntax
Below is a line-by-line overview of the automation syntax. Expand each line to learn more.
Examples
1. Cast Integer Column to Float (Decimal)
cast the table's "Amt" column to "float"
2. Cast Numeric Column to String (Text)
cast the table's "Max" column to "string"
3. Cast Column to Integer with Blank Value
In this example, the "Price" column contains some missing or empty values. When converting to integer, these blank entries are replaced with 0.
cast the table's "Price" column to "int"
the blank value is 0
4. Cast Column to Float with Custom Blank Value
When converting a column with missing values to decimal format, a custom replacement value of 0.0 is used for empty cells.
cast the table's "Amount" column to "float"
the blank value is 0.0
Last updated
Was this helpful?