RAISERROR_UDF (DOUBLE, DOUBLE, DOUBLE, ARRAY)
Definition
This user-defined function (UDF) throws an exception with a specific message.
RAISERROR_UDF(MSG_ID DOUBLE, SEVERITY DOUBLE, STATE DOUBLE, PARAMS ARRAY)Parameters
MSG_ID DOUBLE
The message ID of the error message.
SEVERITY DOUBLE
The severity number for the error.
STATE DOUBLE
The state number for the error message.
PARAMS ARRAY
The additional information of the error message.
Returns
Returns a varchar with an error message.
Usage example
Input:
SELECT RAISERROR_UDF(2.1, 1.6, 1.0, array_construct('More information'));Output:
MESSAGE: 2.1, LEVEL: 1.6, STATE: 1Last updated
