FORMATMESSAGE_UDF

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