TRUNC (number) UDF
Last updated
Last updated
The
TRUNC
(number) function returnsn1
truncated ton2
decimal places. Ifn2
is omitted, thenn1
is truncated to 0 places.n2
can be negative to truncate (make zero)n2
digits left of the decimal point. ()
TRUNC_UDF for numeric values will be added to handle cases where the first column has an unrecognized data type.
Example:
If the definition of column1
was not provided to the tool. Then the TRUNC_UDF
will be added and in execution time, the overload of TRUNC_UDF
will handle the case if it is a numeric or a date type.
Please refer to section.
The following sections provide the proof that TRUNC_UDF
will handle perfectly numeric values.
It calls Snowflake TRUNC
with the input number. This overload exists in order to handle the different types of parameter scenarios, in case that information is not available during the migration.
Parameters
INPUT: The NUMBER
that needs to be truncated.
Parameters
INPUT: The NUMBER
that needs to be truncated.
SCALE: Represents the number of digits the output will include after the decimal point.
No issues were found.
No related EWIs.
It calls Snowflake TRUNC
with the input number and the scale. This overload exists in order to handle the different types of parameter scenarios, in case that information is not available during the migration.