SQL Server CRLF Function
Updated 2023-11-10 14:33:59.883000
Description
Use the scalar function CRLF to insert a Carriage Return Char(13) and a Line Feed Char(10) into a string.
Syntax
SELECT [westclintech].[wct].[CRLF] ()
Arguments
Return Type
nvarchar(4000)
Remarks
Use CRLF instead of Char(13) + Char(10)
Examples
select 'now is the time ' + wct.CRLF() + 'for all good men ' + wct.CRLF() +
'to come to the aid ' + wct.CRLF() + 'of their country';
This produces the following result.
| column 1 |
|---|
| now is the time |
| for all good men |
| to come to the aid |
| of their country |