WRAP_NEGATIVE_WITH_ANGLE_BRACKETS_UDF

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

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