QUOTENAME_UDF (VARCHAR, VARCHAR)

Definition

This user-defined function (UDF) creates a valid SQL Server delimited identifier by returning a Unicode string with the delimiters added.

QUOTENAME_UDF(STR VARCHAR, QUOTECHAR VARCHAR)

Parameters

STR VARCHAR

The string to be transformed.

QUOTECHAR VARCHAR

The delimiter to add to the first parameter.

Returns

Returns a varchar with the second parameter identifier added as delimiter.

Usage example

Input:

SELECT QUOTENAME_UDF('test', '?');

Output:

?test?

Last updated