Monday, February 27, 2017

How to remove all NewLines from a variable in SQL Server

Declare @A NVarChar(500);

Set @A = N' 12345
        25487
        154814 ';

Set @A = Replace(@A,CHAR(13)+CHAR(10),' ');

Print @A;

No comments:

Post a Comment