TRIM
Updated 2023-11-10 16:09:50.510000
Syntax
SELECT [westclintech].[wct].[TRIM] (
<@Text, nvarchar(max),>)
Description
Use the scalar function TRIM to remove trailing and leading spaces from 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
TRIM(@Text) = RTRIM(LTRIM(@Text)).
Examples
select '>>>' + wct.TRIM(' 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<<<"}]}