INSERT_CURRENCY_UDF

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

Definition

Insert the specified currency text at the given position in the number, or before the first digit to avoid leaving blanks or the number sign between the currency and the number.

PUBLIC.INSERT_CURRENCY_UDF(INPUT VARCHAR, CURRENCYINDEX INTEGER, CURRENCYVALUE VARCHAR)

Parameters

INPUT VARCHAR

The result of the TO_CHAR(Numeric) that needs the currency inserted.

CURRENCYINDEX INTEGER

The index to insert the currency at.

CURRENCYVALUE VARCHAR

The text that will be inserted as currency.

Returns

A varchar which has the currency text at a specific position.

Usage example

Input:

SELECT PUBLIC.INSERT_CURRENCY_UDF(to_char(823, 'S999999'), '1', 'CRC');

Output:

'+CRC823'

Last updated