FORMATMESSAGE_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

This user-defined function (UDF) provides the functionality of the SQL Server FORMATMESSAGE function. It constructs a message from an existing message from a provided string.

FORMATMESSAGE_UDF(MESSAGE STRING, ARGS ARRAY)

Parameters

MESSAGE STRING

The existing message string.

ARGS ARRAY

The arguments to be added on the first message string.

Returns

Returns a string with the corresponding concatenated message related to the argument's positions.

Usage example

Input:

SELECT FORMATMESSAGE_UDF('Test %s!', TO_ARRAY('a'));

Output:

Test a!

Last updated