WRAP_NEGATIVE_WITH_ANGLE_BRACKETS_UDF

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.

Definition

Wraps negative numbers between angle brackets instead of the minus sign. It is generated instead of a normal call to TO_CHAR if the PR format element was present in the original Teradata format.

PUBLIC.WRAP_NEGATIVE_WITH_ANGLE_BRACKETS_UDF(INPUT NUMBER, FORMATARG VARCHAR)

Parameters

INPUT NUMBER

The number to convert to varchar.

FORMATARG VARCHAR

The format argument that will be used to convert INPUT to varchar.

Returns

A varchar with negative numbers wrapped between angle brackets.

Usage example

Input:

SELECT PUBLIC.WRAP_NEGATIVE_WITH_ANGLE_BRACKETS_UDF(8456, '9999');
SELECT PUBLIC.WRAP_NEGATIVE_WITH_ANGLE_BRACKETS_UDF(-8456, '9999');

Output:

'8456'
'<8456>'

Last updated