STR_UDF (FLOAT, VARCHAR)

Definition

This user-defined function (UDF) is a template for translating the functionality of SQL Server STR() to Snowflake when it's used with one or two optional parameters

STR_UDF(FLOAT_EXPR FLOAT, FORMAT VARCHAR)

Parameters

FLOAT_EXPR FLOAT

The expression to be processed.

FORMAT VARCHAR

The format to apply.

Returns

Returns a varchar with the formatted expression.

Usage example

Input:

SELECT STR_UDF(1.5, '99');

Output:

2

Last updated