How can I can remove all NewLine from a variable in SQL Server?
I use SQL Server 2008 R2.
I need remove all NewLine in a variable in a T-Sql Command.
For example:
Declare @A NVarChar(500)
Set @A = ' 12345
25487
154814 '
Print @A
And it printed like this:
12345
25487
154814
But I want to get strings like this:
12345 25487 154814
I write this query, but it does not work:
Set @A = Replace(@A,CHAR(13),' ')