Cast from Number Datatypes to Varchar Datatype

Translation specification for the transformation of cast Varchar Datatype Snowflake.

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Teradata when casts to varchar uses default formats for each number datatype, so Snowconvert adds formats to keep the equivalence among platforms.

Sample Source Patterns

BYTEINT

Teradata

IN -> Teradata_01.sql
SELECT '"'||cast(cast(12 as BYTEINT) as varchar(10))||'"';

Snowflake

OUT -> Teradata_01.sql
SELECT
'"'|| LEFT(TO_VARCHAR(cast(12 as BYTEINT), 'TM'), 10) ||'"';

SMALLINT

Teradata

Snowflake

INTEGER

Teradata

Snowflake

BIGINT

Teradata

Snowflake

DECIMAL[(n[,m])] or NUMERIC[(n[,m])]

Teradata

Snowflake

Known Issues

  • Teradata treats the numbers between 0 and 1 differently than Snowflake. For those values, Teradata does not add the zero before the dot; meanwhile, Snowflake does.

Teradata

Snowflake

No related EWIs.

Last updated