Logo

QUOTED

Updated 2023-06-15 22:13:18.990000

Syntax

SELECT [westclintech].[wct].[QUOTED] (
   <@Text, nvarchar(max),>)

Description

Use the scalar function QUOTED to add quotation marks, CHAR(34), to the beginning and end of a string of text.

Arguments

@Text

is the text value to be evaluated. The @Text argument can be of data types that are implicitly convertible to nvarchar or ntext.

Return Type

nvarchar(max)

Remarks

To add single quotes, CHAR(39), use the QUOTES function.

Examples

select wct.QUOTED('now is the time for all good men to come to the aid of their country');

This produces the following result.

{"columns":[{"field":"column 1"}],"rows":[{"column 1":"\"now is the time for all good men to come to the aid of their country\""}]}